math-exercises 3.0.56 → 3.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts +2 -0
- package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/operationsPriorities.js +46 -36
- package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.js +65 -13
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -4
- package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts +16 -0
- package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/facto1.js +184 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +43 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +23 -0
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +23 -0
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +49 -0
- package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/capacityConversion.js +68 -12
- package/lib/exercises/math/conversion/hoursToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/conversion/hoursToDecimal.js +73 -15
- package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +55 -6
- package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/massConversion.js +72 -16
- package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeConversion.js +72 -12
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts +8 -0
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.js +102 -0
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts +7 -0
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.js +52 -0
- package/lib/exercises/math/derivation/convexity/index.d.ts +4 -0
- package/lib/exercises/math/derivation/convexity/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/index.js +3 -0
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts +7 -0
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.js +134 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +79 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +85 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +86 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +76 -0
- package/lib/exercises/math/derivation/derivative/exp/index.d.ts +6 -0
- package/lib/exercises/math/derivation/derivative/exp/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/index.js +5 -0
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.js +84 -0
- package/lib/exercises/math/derivation/derivative/index.d.ts +6 -27
- package/lib/exercises/math/derivation/derivative/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/index.js +6 -27
- package/lib/exercises/math/derivation/derivative/ln/index.d.ts +4 -0
- package/lib/exercises/math/derivation/derivative/ln/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/index.js +3 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.js +81 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.js +103 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.js +77 -0
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.js +71 -0
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts +11 -0
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.js +88 -0
- package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/index.js +7 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.js +115 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.js +80 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts +9 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.js +67 -0
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.js +134 -0
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts +11 -0
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.js +97 -0
- package/lib/exercises/math/derivation/derivative/power/index.d.ts +3 -0
- package/lib/exercises/math/derivation/derivative/power/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/power/index.js +2 -0
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts +9 -0
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.js +122 -0
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.js +118 -0
- package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts +3 -0
- package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/index.js +3 -0
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.js +115 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +77 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.js +85 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.js +81 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.js +103 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +5 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.js +4 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.js +70 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.js +91 -0
- package/lib/exercises/math/derivation/derivativeNumberCalcul.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivativeNumberCalcul.js +4 -2
- package/lib/exercises/math/derivation/index.d.ts +2 -0
- package/lib/exercises/math/derivation/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/index.js +2 -0
- package/lib/exercises/math/derivation/variations/index.d.ts +2 -0
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/index.js +1 -0
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts +11 -0
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.js +168 -0
- package/lib/exercises/math/equaDiff/equaDiffAyPlusB.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffAyPlusB.js +39 -22
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +7 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +38 -15
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +29 -8
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts +8 -0
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -0
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +86 -0
- package/lib/exercises/math/equaDiff/index.d.ts +1 -1
- package/lib/exercises/math/equaDiff/index.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/index.js +1 -1
- package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/signFunction.js +23 -11
- package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +3 -0
- package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expFactorization.js +3 -0
- package/lib/exercises/math/functions/exponential/expSimplifiying.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expSimplifiying.js +83 -45
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +12 -5
- package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.js +63 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +68 -29
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.js +56 -4
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.js +71 -25
- package/lib/exercises/math/limits/polynomLimit.d.ts +1 -1
- package/lib/exercises/math/limits/polynomLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimit.js +28 -9
- package/lib/exercises/math/limits/polynomLimitNoFI.d.ts +1 -1
- package/lib/exercises/math/limits/polynomLimitNoFI.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimitNoFI.js +29 -10
- package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
- package/lib/exercises/math/powers/calculateNegativePower.js +59 -16
- package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
- package/lib/exercises/math/powers/decimalToScientific.js +55 -11
- package/lib/exercises/math/powers/index.d.ts +1 -0
- package/lib/exercises/math/powers/index.d.ts.map +1 -1
- package/lib/exercises/math/powers/index.js +1 -0
- package/lib/exercises/math/powers/powersDivision.d.ts +5 -2
- package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersDivision.js +68 -53
- package/lib/exercises/math/powers/powersMixOperations.d.ts +1 -0
- package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersMixOperations.js +88 -17
- package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts +10 -0
- package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts.map +1 -0
- package/lib/exercises/math/powers/powersOfTenMixOperations.js +129 -0
- package/lib/exercises/math/powers/powersOfTenToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersOfTenToDecimal.js +32 -3
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +1 -0
- package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/scientificToDecimal.js +50 -10
- package/lib/exercises/math/primitive/klogUPrimitive.js +1 -1
- package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -0
- package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +42 -11
- package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.js +8 -20
- package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/etendueList.js +4 -6
- package/lib/exercises/math/probaStat/stats1var/interquartilesList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/interquartilesList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/interquartilesTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/interquartilesTable.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -9
- package/lib/exercises/math/probaStat/stats1var/median.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/median.js +19 -14
- package/lib/exercises/math/probaStat/stats1var/medianList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/medianList.js +3 -0
- package/lib/exercises/math/probaStat/stats1var/quartiles.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartiles.js +16 -11
- package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartilesList.js +18 -14
- package/lib/exercises/math/probaStat/stats1var/standardDeviationList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/standardDeviationList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/varianceList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/varianceList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/varianceTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/varianceTable.js +4 -4
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +40 -2
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +32 -0
- package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometry.js +67 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +89 -0
- package/lib/exercises/pc/index.d.ts +5 -5
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +5 -5
- package/lib/index.d.ts +56 -45
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/angle.d.ts.map +1 -1
- package/lib/math/geometry/angle.js +0 -5
- package/lib/math/geometry/vector.d.ts +1 -0
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +19 -0
- package/lib/math/numbers/decimals/decimal.d.ts +1 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +2 -0
- package/lib/math/systems/generalSystem.d.ts +6 -1
- package/lib/math/systems/generalSystem.d.ts.map +1 -1
- package/lib/math/systems/generalSystem.js +137 -0
- package/lib/math/utils/arithmetic/lcm.js +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +4 -34
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.d.ts +7 -1
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +17 -9
- package/lib/tree/nodes/functions/logNode.js +2 -4
- package/lib/tree/nodes/operators/addNode.js +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +35 -11
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +4 -3
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +5 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +3 -1
- package/lib/tree/parsers/latexParser.js +6 -2
- package/package.json +1 -1
|
@@ -5,62 +5,90 @@ import { Power } from "../../../math/numbers/integer/power.js";
|
|
|
5
5
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
6
6
|
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
7
7
|
import { power } from "../../../tree/nodes/operators/powerNode.js";
|
|
8
|
-
import {
|
|
8
|
+
import { substract, } from "../../../tree/nodes/operators/substractNode.js";
|
|
9
9
|
import { alignTex } from "../../../utils/latex/alignTex.js";
|
|
10
10
|
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
11
11
|
import { addValidProp, tryToAddWrongProp, } from "../../exercise.js";
|
|
12
12
|
import { getDistinctQuestions } from "../../utils/getDistinctQuestions.js";
|
|
13
13
|
import { rationalParser } from "../../../tree/parsers/rationalParser.js";
|
|
14
14
|
import { powerParser } from "../../../tree/parsers/powerParser.js";
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const [b, c] = [1, 2].map((el) => randint(-11, 11));
|
|
18
|
-
const statement = frac(power(a, b), power(a, c));
|
|
19
|
-
const answerTree = power(a, b - c).simplify();
|
|
20
|
-
const answer = answerTree.toTex();
|
|
21
|
-
const statementTex = statement.toTex();
|
|
22
|
-
const question = {
|
|
23
|
-
instruction: `Simplifier :
|
|
15
|
+
const getInstruction = (identifiers) => {
|
|
16
|
+
return `Simplifier :
|
|
24
17
|
|
|
25
18
|
$$
|
|
26
|
-
${
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
${getStartStatement(identifiers)}
|
|
20
|
+
$$`;
|
|
21
|
+
};
|
|
22
|
+
const getAnswer = (identifiers) => {
|
|
23
|
+
const { a, b, c } = identifiers;
|
|
24
|
+
const answerTree = power(a, b - c).simplify();
|
|
25
|
+
const answer = answerTree.toTex();
|
|
26
|
+
return answer;
|
|
27
|
+
};
|
|
28
|
+
const getHint = (identifiers, opts) => {
|
|
29
|
+
return `${opts?.useOnlyPowersOfTen
|
|
30
|
+
? `Pour diviser deux puissances de $10$, on utilise la propriété :
|
|
33
31
|
|
|
34
32
|
$\\frac{10^a}{10^b} = 10^{a-b}$`
|
|
35
|
-
|
|
33
|
+
: `Pour diviser deux puissances d'un même nombre $x$, on utilise la propriété :
|
|
34
|
+
|
|
35
|
+
$\\frac{x^a}{x^b} = x^{a-b}$`}`;
|
|
36
|
+
};
|
|
37
|
+
const getCorrection = (identifiers, opts) => {
|
|
38
|
+
const statementTex = getStartStatement(identifiers);
|
|
39
|
+
const answer = getAnswer(identifiers);
|
|
40
|
+
const { a, b, c } = identifiers;
|
|
41
|
+
if (opts?.useOnlyPowersOfTen) {
|
|
42
|
+
return `On utilise la propriété :
|
|
43
|
+
|
|
44
|
+
$$
|
|
45
|
+
\\frac{10^a}{10^b} = 10^{a-b}
|
|
46
|
+
$$
|
|
36
47
|
|
|
37
|
-
|
|
38
|
-
correction: `${opts?.useOnlyPowersOfTen
|
|
39
|
-
? `On utilise la propriété : $\\frac{10^a}{10^b} = 10^{a-b}$. On a alors :
|
|
48
|
+
On a alors :
|
|
40
49
|
|
|
41
50
|
${alignTex([
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
[statementTex, "=", power(10, substract(b, c)).toTex()],
|
|
52
|
+
["", "=", answer],
|
|
53
|
+
])}`;
|
|
54
|
+
}
|
|
55
|
+
return `On utilise la propriété :
|
|
56
|
+
|
|
57
|
+
$$
|
|
58
|
+
\\frac{x^a}{x^b} = x^{a-b}
|
|
59
|
+
$$
|
|
60
|
+
|
|
61
|
+
On a alors :
|
|
50
62
|
|
|
51
63
|
${alignTex([
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
[statementTex, "=", power(a, substract(b, c)).toTex()],
|
|
65
|
+
["", "=", answer],
|
|
66
|
+
])}`;
|
|
67
|
+
};
|
|
68
|
+
const getStartStatement = (identifiers) => {
|
|
69
|
+
const { a, b, c } = identifiers;
|
|
70
|
+
const statement = frac(power(a, b), power(a, c));
|
|
71
|
+
return statement.toTex();
|
|
72
|
+
};
|
|
73
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
74
|
+
const question = {
|
|
75
|
+
instruction: getInstruction(identifiers, opts),
|
|
76
|
+
startStatement: getStartStatement(identifiers, opts),
|
|
77
|
+
answer: getAnswer(identifiers, opts),
|
|
78
|
+
keys: [],
|
|
79
|
+
hint: getHint(identifiers, opts),
|
|
80
|
+
correction: getCorrection(identifiers, opts),
|
|
59
81
|
answerFormat: "tex",
|
|
60
|
-
identifiers
|
|
82
|
+
identifiers,
|
|
61
83
|
};
|
|
62
84
|
return question;
|
|
63
85
|
};
|
|
86
|
+
const getPowersDivisionQuestion = (opts) => {
|
|
87
|
+
let a = opts.useOnlyPowersOfTen ? 10 : randint(-11, 11, [0]);
|
|
88
|
+
const [b, c] = [1, 2].map((el) => randint(-11, 11));
|
|
89
|
+
const identifiers = { a, b, c };
|
|
90
|
+
return getQuestionFromIdentifiers(identifiers, opts);
|
|
91
|
+
};
|
|
64
92
|
const getPropositions = (n, { answer, a, b, c }) => {
|
|
65
93
|
const propositions = [];
|
|
66
94
|
addValidProp(propositions, answer);
|
|
@@ -88,34 +116,20 @@ export const powersDivision = {
|
|
|
88
116
|
id: "powersDivision",
|
|
89
117
|
connector: "=",
|
|
90
118
|
label: "Division de puissances",
|
|
91
|
-
levels: [
|
|
92
|
-
"4ème",
|
|
93
|
-
"3ème",
|
|
94
|
-
"2nde",
|
|
95
|
-
"2ndPro",
|
|
96
|
-
"1reESM",
|
|
97
|
-
"1rePro",
|
|
98
|
-
"1reSpé",
|
|
99
|
-
"1reTech",
|
|
100
|
-
"TermPro",
|
|
101
|
-
"TermTech",
|
|
102
|
-
],
|
|
103
|
-
sections: ["Puissances"],
|
|
104
119
|
isSingleStep: true,
|
|
105
|
-
generator: (nb) => getDistinctQuestions(() => getPowersDivisionQuestion({ useOnlyPowersOfTen: false }), nb),
|
|
120
|
+
generator: (nb, opts) => getDistinctQuestions(() => getPowersDivisionQuestion({ useOnlyPowersOfTen: false }), nb),
|
|
106
121
|
qcmTimer: 60,
|
|
107
122
|
freeTimer: 60,
|
|
108
123
|
getPropositions,
|
|
109
124
|
isAnswerValid,
|
|
110
125
|
subject: "Mathématiques",
|
|
111
126
|
hasHintAndCorrection: true,
|
|
127
|
+
getQuestionFromIdentifiers,
|
|
112
128
|
};
|
|
113
129
|
export const powersOfTenDivision = {
|
|
114
130
|
id: "powersOfTenDivision",
|
|
115
131
|
connector: "=",
|
|
116
132
|
label: "Division de puissances de $10$",
|
|
117
|
-
levels: ["4ème", "3ème", "2nde"],
|
|
118
|
-
sections: ["Puissances"],
|
|
119
133
|
isSingleStep: true,
|
|
120
134
|
generator: (nb) => getDistinctQuestions(() => getPowersDivisionQuestion({ useOnlyPowersOfTen: true }), nb),
|
|
121
135
|
qcmTimer: 60,
|
|
@@ -124,4 +138,5 @@ export const powersOfTenDivision = {
|
|
|
124
138
|
isAnswerValid,
|
|
125
139
|
subject: "Mathématiques",
|
|
126
140
|
hasHintAndCorrection: true,
|
|
141
|
+
getQuestionFromIdentifiers,
|
|
127
142
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powersMixOperations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersMixOperations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"powersMixOperations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersMixOperations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAwBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvB,CAAC;AA2KF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
4
|
-
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
4
|
+
import { frac, isFractionNode, } from "../../../tree/nodes/operators/fractionNode.js";
|
|
5
5
|
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
6
6
|
import { power } from "../../../tree/nodes/operators/powerNode.js";
|
|
7
7
|
import { powerParser } from "../../../tree/parsers/powerParser.js";
|
|
8
|
+
import { valueParser } from "../../../tree/parsers/valueParser.js";
|
|
9
|
+
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
8
10
|
import { doWhile } from "../../../utils/doWhile.js";
|
|
9
11
|
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
12
|
+
import { isInt } from "../../../utils/isInt.js";
|
|
10
13
|
const getStatementNode = (identifiers) => {
|
|
11
|
-
const { a, b, k, l, m } = identifiers;
|
|
12
|
-
const
|
|
13
|
-
return frac(multiply(power(a, k), power(power(a, l), m)), power(b,
|
|
14
|
+
const { a, b, k, l, m, n } = identifiers;
|
|
15
|
+
const nPower = n ?? k + l * m;
|
|
16
|
+
return frac(multiply(power(a, k), power(power(a, l), m)), power(b, nPower));
|
|
14
17
|
};
|
|
15
18
|
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
16
19
|
const propositions = [];
|
|
@@ -25,7 +28,18 @@ const getPropositions = (n, { answer, ...identifiers }) => {
|
|
|
25
28
|
};
|
|
26
29
|
const getAnswer = (identifiers) => {
|
|
27
30
|
const statement = getStatementNode(identifiers);
|
|
28
|
-
|
|
31
|
+
const { a, b, k, l, m, n } = identifiers;
|
|
32
|
+
if (a !== b) {
|
|
33
|
+
const pow = k + l * m;
|
|
34
|
+
const fraction = frac(a, b).simplify();
|
|
35
|
+
if (isFractionNode(fraction) && fraction.leftChild.evaluate() === 1) {
|
|
36
|
+
return power(fraction.rightChild, -pow).toTex();
|
|
37
|
+
}
|
|
38
|
+
return power(fraction, pow).toTex();
|
|
39
|
+
}
|
|
40
|
+
return power(a, k + l * m - n)
|
|
41
|
+
.simplify({ keepPowers: true })
|
|
42
|
+
.toTex();
|
|
29
43
|
};
|
|
30
44
|
const getInstruction = (identifiers) => {
|
|
31
45
|
return `Écrire sous la forme d'une seule puissance :
|
|
@@ -34,17 +48,58 @@ $$
|
|
|
34
48
|
${getStatementNode(identifiers).toTex()}
|
|
35
49
|
$$`;
|
|
36
50
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
51
|
+
const getHint = (identifiers) => {
|
|
52
|
+
return `On utilise les propriétés suivantes :
|
|
53
|
+
|
|
54
|
+
- $a^x \\times a^y = a^{x+y}$
|
|
55
|
+
|
|
56
|
+
- $(a^x)^y = a^{xy}$
|
|
57
|
+
|
|
58
|
+
- $\\frac{a^x}{a^y} = a^{x-y}$
|
|
59
|
+
`;
|
|
60
|
+
};
|
|
61
|
+
const getCorrection = (identifiers) => {
|
|
62
|
+
const { a, b, k, l, m, n } = identifiers;
|
|
63
|
+
const statement = getStatementNode(identifiers);
|
|
64
|
+
const num = multiply(power(a, k), power(power(a, l), m));
|
|
65
|
+
const firstStep = multiply(power(a, k), power(power(a, l), m).simplify({ keepPowers: true }));
|
|
66
|
+
const numSimp = num.simplify({ keepPowers: true });
|
|
67
|
+
let corr = `On simplifie le numérateur :
|
|
68
|
+
|
|
69
|
+
$$
|
|
70
|
+
${multiply(power(a, k), power(power(a, l), m)).toTex()} = ${firstStep.toTex()} = ${numSimp.toTex()}
|
|
71
|
+
$$
|
|
72
|
+
|
|
73
|
+
`;
|
|
74
|
+
if (a === b) {
|
|
75
|
+
corr += `On a donc :
|
|
76
|
+
|
|
77
|
+
$$
|
|
78
|
+
${statement.toTex()} = ${frac(numSimp, power(a, n)).toTex()} = ${getAnswer(identifiers)}
|
|
79
|
+
$$`;
|
|
80
|
+
return corr;
|
|
81
|
+
}
|
|
82
|
+
const pow = k + l * m;
|
|
83
|
+
const denum = power(b, pow);
|
|
84
|
+
return (corr +
|
|
85
|
+
`On a donc :
|
|
86
|
+
|
|
87
|
+
$$
|
|
88
|
+
${statement.toTex()} = ${frac(numSimp, denum).toTex()} = ${getAnswer(identifiers)}
|
|
89
|
+
$$
|
|
90
|
+
`);
|
|
91
|
+
};
|
|
43
92
|
const getKeys = (identifiers) => {
|
|
44
93
|
return [];
|
|
45
94
|
};
|
|
46
95
|
const isAnswerValid = (ans, { answer }) => {
|
|
47
96
|
try {
|
|
97
|
+
if (isInt(Number(answer))) {
|
|
98
|
+
const parsed = valueParser(ans);
|
|
99
|
+
if (parsed !== false) {
|
|
100
|
+
return parsed === Number(answer);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
48
103
|
const parsed = powerParser(ans);
|
|
49
104
|
if (!parsed)
|
|
50
105
|
return false;
|
|
@@ -57,25 +112,39 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
57
112
|
const getPowersMixOperationsQuestion = (ops) => {
|
|
58
113
|
const finalPower = randint(2, 10);
|
|
59
114
|
const a = randint(2, 10);
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
115
|
+
const bEqualsA = coinFlip();
|
|
116
|
+
const b = bEqualsA ? a : randint(2, 10, [a]);
|
|
117
|
+
let l, m, k, n;
|
|
118
|
+
if (!bEqualsA) {
|
|
119
|
+
l = randint(-5, 6, [0, 1]);
|
|
120
|
+
m = doWhile(() => randint(2, 6), (x) => x * l === finalPower);
|
|
121
|
+
k = finalPower - l * m;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
l = randint(-5, 6);
|
|
125
|
+
m = randint(-5, 6);
|
|
126
|
+
k = randint(-5, 6);
|
|
127
|
+
n = randint(-5, 6);
|
|
128
|
+
}
|
|
64
129
|
const identifiers = {
|
|
65
130
|
a,
|
|
66
131
|
b,
|
|
67
132
|
k,
|
|
68
133
|
l,
|
|
69
134
|
m,
|
|
135
|
+
n,
|
|
70
136
|
};
|
|
137
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
138
|
+
};
|
|
139
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
71
140
|
const question = {
|
|
72
141
|
answer: getAnswer(identifiers),
|
|
73
142
|
instruction: getInstruction(identifiers),
|
|
74
143
|
keys: getKeys(identifiers),
|
|
75
144
|
answerFormat: "tex",
|
|
76
145
|
identifiers,
|
|
77
|
-
|
|
78
|
-
|
|
146
|
+
hint: getHint(identifiers),
|
|
147
|
+
correction: getCorrection(identifiers),
|
|
79
148
|
};
|
|
80
149
|
return question;
|
|
81
150
|
};
|
|
@@ -94,4 +163,6 @@ export const powersMixOperations = {
|
|
|
94
163
|
// getHint,
|
|
95
164
|
// getCorrection,
|
|
96
165
|
getAnswer,
|
|
166
|
+
hasHintAndCorrection: true,
|
|
167
|
+
getQuestionFromIdentifiers,
|
|
97
168
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
c: number;
|
|
6
|
+
d: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const powersOfTenMixOperations: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=powersOfTenMixOperations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"powersOfTenMixOperations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersOfTenMixOperations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuHF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAkB1D,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../math/utils/random/randint.js";
|
|
4
|
+
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
5
|
+
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
6
|
+
import { power } from "../../../tree/nodes/operators/powerNode.js";
|
|
7
|
+
import { powerParser } from "../../../tree/parsers/powerParser.js";
|
|
8
|
+
import { valueParser } from "../../../tree/parsers/valueParser.js";
|
|
9
|
+
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
10
|
+
import { isInt } from "../../../utils/isInt.js";
|
|
11
|
+
const getPropositions = (n, { answer }) => {
|
|
12
|
+
const propositions = [];
|
|
13
|
+
addValidProp(propositions, answer);
|
|
14
|
+
while (propositions.length < n) {
|
|
15
|
+
tryToAddWrongProp(propositions, power(10, randint(-9, 10)).simplify({ keepPowers: true }).toTex());
|
|
16
|
+
}
|
|
17
|
+
return shuffleProps(propositions, n);
|
|
18
|
+
};
|
|
19
|
+
const getAnswer = (identifiers) => {
|
|
20
|
+
const { a, b, c, d } = identifiers;
|
|
21
|
+
return power(10, a + b - c * d)
|
|
22
|
+
.simplify({ keepPowers: true })
|
|
23
|
+
.toTex();
|
|
24
|
+
};
|
|
25
|
+
const getInstruction = (identifiers) => {
|
|
26
|
+
const { a, b, c, d } = identifiers;
|
|
27
|
+
return `Écrire sous la forme d'une seule puissance de $10$ :
|
|
28
|
+
|
|
29
|
+
$$
|
|
30
|
+
${frac(multiply(power(10, a), power(10, b)), power(power(10, c), d)).toTex()}
|
|
31
|
+
$$`;
|
|
32
|
+
};
|
|
33
|
+
const getHint = (identifiers) => {
|
|
34
|
+
const { a, b, c, d } = identifiers;
|
|
35
|
+
return `On utilise les propriétés suivantes :
|
|
36
|
+
|
|
37
|
+
- $10^a \\times 10^b = 10^{a+b}$
|
|
38
|
+
|
|
39
|
+
- $(10^a)^b = 10^{ab}$
|
|
40
|
+
|
|
41
|
+
- $\\frac{10^a}{10^b} = 10^{a-b}$
|
|
42
|
+
`;
|
|
43
|
+
};
|
|
44
|
+
const getCorrection = (identifiers) => {
|
|
45
|
+
const { a, b, c, d } = identifiers;
|
|
46
|
+
const statement = frac(multiply(power(10, a), power(10, b)), power(power(10, c), d));
|
|
47
|
+
const num = power(10, a + b).simplify({ keepPowers: true });
|
|
48
|
+
const denum = power(10, c * d).simplify({ keepPowers: true });
|
|
49
|
+
return `On simplifie le numérateur :
|
|
50
|
+
|
|
51
|
+
$$
|
|
52
|
+
${multiply(power(10, a), power(10, b)).toTex()} = ${num.toTex()}
|
|
53
|
+
$$
|
|
54
|
+
|
|
55
|
+
Puis le dénumérateur :
|
|
56
|
+
|
|
57
|
+
$$
|
|
58
|
+
${power(power(10, c), d).toTex()} = ${denum.toTex()}
|
|
59
|
+
$$
|
|
60
|
+
|
|
61
|
+
On a donc :
|
|
62
|
+
|
|
63
|
+
$$
|
|
64
|
+
${statement.toTex()} = ${frac(num, denum).toTex()} = ${getAnswer(identifiers)}
|
|
65
|
+
$$
|
|
66
|
+
`;
|
|
67
|
+
};
|
|
68
|
+
const getKeys = (identifiers) => {
|
|
69
|
+
return [];
|
|
70
|
+
};
|
|
71
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
72
|
+
try {
|
|
73
|
+
if (isInt(Number(answer))) {
|
|
74
|
+
const parsed = valueParser(ans);
|
|
75
|
+
if (parsed !== false) {
|
|
76
|
+
return parsed === Number(answer);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const parsed = powerParser(ans);
|
|
80
|
+
if (!parsed)
|
|
81
|
+
return false;
|
|
82
|
+
return parsed.simplify({ keepPowers: true }).toTex() === answer;
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
return handleVEAError(err);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const getPowersOfTenMixOperationsQuestion = (ops) => {
|
|
89
|
+
const a = randint(-9, 10);
|
|
90
|
+
const b = randint(-9, 10);
|
|
91
|
+
const c = randint(-9, 10);
|
|
92
|
+
const d = randint(-9, 10);
|
|
93
|
+
const identifiers = {
|
|
94
|
+
a,
|
|
95
|
+
b,
|
|
96
|
+
c,
|
|
97
|
+
d,
|
|
98
|
+
};
|
|
99
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
100
|
+
};
|
|
101
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
102
|
+
return {
|
|
103
|
+
answer: getAnswer(identifiers),
|
|
104
|
+
instruction: getInstruction(identifiers),
|
|
105
|
+
keys: getKeys(identifiers),
|
|
106
|
+
answerFormat: "tex",
|
|
107
|
+
identifiers,
|
|
108
|
+
hint: getHint(identifiers),
|
|
109
|
+
correction: getCorrection(identifiers),
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export const powersOfTenMixOperations = {
|
|
113
|
+
id: "powersOfTenMixOperations",
|
|
114
|
+
connector: "=",
|
|
115
|
+
label: "Calcul avec des puissances de $10$ : mélange d'opérations",
|
|
116
|
+
isSingleStep: true,
|
|
117
|
+
generator: (nb, opts) => getDistinctQuestions(() => getPowersOfTenMixOperationsQuestion(opts), nb),
|
|
118
|
+
qcmTimer: 60,
|
|
119
|
+
freeTimer: 60,
|
|
120
|
+
getPropositions,
|
|
121
|
+
isAnswerValid,
|
|
122
|
+
subject: "Mathématiques",
|
|
123
|
+
getInstruction,
|
|
124
|
+
// getHint,
|
|
125
|
+
// getCorrection,
|
|
126
|
+
getAnswer,
|
|
127
|
+
getQuestionFromIdentifiers,
|
|
128
|
+
hasHintAndCorrection: true,
|
|
129
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powersOfTenToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersOfTenToDecimal.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"powersOfTenToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersOfTenToDecimal.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,EACL,QAAQ,EAcT,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAoGF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAkBtD,CAAC"}
|
|
@@ -32,10 +32,36 @@ const getAnswer = (identifiers) => {
|
|
|
32
32
|
return answer;
|
|
33
33
|
};
|
|
34
34
|
const getPowersOfTenToDecimalQuestion = () => {
|
|
35
|
-
const randPower = randint(-
|
|
35
|
+
const randPower = randint(-6, 7);
|
|
36
36
|
const identifiers = { randPower };
|
|
37
37
|
return getQuestionFromIdentifiers(identifiers);
|
|
38
38
|
};
|
|
39
|
+
const getHint = (identifiers) => {
|
|
40
|
+
return `Si $x$ est un entier positif, alors $10^x$ est le nombre composé d'un $1$ suivi de $x$ zéros.
|
|
41
|
+
|
|
42
|
+
Si $x$ est un entier négatif, alors $10^x$ est le nombre composé d'un $1$ précédé de $x$ zéros.
|
|
43
|
+
|
|
44
|
+
Enfin, tout nombre élevé à la puissance $0$ est égal à $1$.`;
|
|
45
|
+
};
|
|
46
|
+
const getCorrection = (identifiers) => {
|
|
47
|
+
const { randPower } = identifiers;
|
|
48
|
+
const order = randPower < 0 ? "précédé" : "suivi";
|
|
49
|
+
let corr = "";
|
|
50
|
+
if (randPower === 0) {
|
|
51
|
+
corr = `Tout nombre élevé à la puissance $0$ est égal à $1$ : `;
|
|
52
|
+
}
|
|
53
|
+
else if (randPower === 1) {
|
|
54
|
+
corr = `Un nombre élevé à la puissance $1$ est égal à lui-même :`;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
corr = `$10^{${randPower}}$ est le nombre composé d'un $1$ ${order} de $${Math.abs(randPower)}$ zéros :`;
|
|
58
|
+
}
|
|
59
|
+
const final = `
|
|
60
|
+
$$
|
|
61
|
+
${getStartStatement(identifiers)}=${getAnswer(identifiers)}
|
|
62
|
+
$$`;
|
|
63
|
+
return corr + final;
|
|
64
|
+
};
|
|
39
65
|
const getQuestionFromIdentifiers = (identifiers) => {
|
|
40
66
|
const question = {
|
|
41
67
|
instruction: getInstruction(identifiers),
|
|
@@ -44,6 +70,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
44
70
|
keys: [],
|
|
45
71
|
answerFormat: "tex",
|
|
46
72
|
identifiers,
|
|
73
|
+
hint: getHint(identifiers),
|
|
74
|
+
correction: getCorrection(identifiers),
|
|
47
75
|
};
|
|
48
76
|
return question;
|
|
49
77
|
};
|
|
@@ -68,10 +96,10 @@ export const powersOfTenToDecimal = {
|
|
|
68
96
|
connector: "=",
|
|
69
97
|
label: "Écriture décimale d'une puissance de $10$",
|
|
70
98
|
isSingleStep: true,
|
|
71
|
-
generator: (nb) => getDistinctQuestions(getPowersOfTenToDecimalQuestion, nb,
|
|
99
|
+
generator: (nb) => getDistinctQuestions(getPowersOfTenToDecimalQuestion, nb, 12),
|
|
72
100
|
qcmTimer: 60,
|
|
73
101
|
freeTimer: 60,
|
|
74
|
-
maxAllowedQuestions:
|
|
102
|
+
maxAllowedQuestions: 12,
|
|
75
103
|
getPropositions,
|
|
76
104
|
isAnswerValid,
|
|
77
105
|
subject: "Mathématiques",
|
|
@@ -79,4 +107,5 @@ export const powersOfTenToDecimal = {
|
|
|
79
107
|
getAnswer,
|
|
80
108
|
getStartStatement,
|
|
81
109
|
getQuestionFromIdentifiers,
|
|
110
|
+
hasHintAndCorrection: true,
|
|
82
111
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powersProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersProduct.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,OAAO,EACL,QAAQ,EAiBT,MAAM,mBAAmB,CAAC;AAM3B,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;
|
|
1
|
+
{"version":3,"file":"powersProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersProduct.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,OAAO,EACL,QAAQ,EAiBT,MAAM,mBAAmB,CAAC;AAM3B,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AA6IF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAuB7D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAyBxD,CAAC"}
|
|
@@ -85,6 +85,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
|
85
85
|
const getPropositions = (n, { answer, a, b, c }) => {
|
|
86
86
|
const propositions = [];
|
|
87
87
|
addValidProp(propositions, answer);
|
|
88
|
+
tryToAddWrongProp(propositions, power(a, add(b, c)).simplify().toTex());
|
|
88
89
|
while (propositions.length < n) {
|
|
89
90
|
const wrongExponent = b + c + randint(-11, 11, [0, -b - c]);
|
|
90
91
|
const wrongAnswerTree = new Power(a === 1 || a === -1 ? randint(-3, 4, [-1, 1]) : a, wrongExponent).simplify();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scientificToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/scientificToDecimal.ts"],"names":[],"mappings":"AAAA;;MAEM;
|
|
1
|
+
{"version":3,"file":"scientificToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/scientificToDecimal.ts"],"names":[],"mappings":"AAAA;;MAEM;AAaN,OAAO,EACL,QAAQ,EAeT,MAAM,mBAAmB,CAAC;AAE3B,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA8FF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* a*10^x vers décimal
|
|
3
3
|
* */
|
|
4
|
+
import { numberVEA } from "../../../exercises/vea/numberVEA.js";
|
|
4
5
|
import { Decimal, DecimalConstructor, } from "../../../math/numbers/decimals/decimal.js";
|
|
5
6
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
6
7
|
import { NumberNode } from "../../../tree/nodes/numbers/numberNode.js";
|
|
@@ -8,22 +9,59 @@ import { MultiplyNode } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
|
8
9
|
import { PowerNode } from "../../../tree/nodes/operators/powerNode.js";
|
|
9
10
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../exercise.js";
|
|
10
11
|
import { getDistinctQuestions } from "../../utils/getDistinctQuestions.js";
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const getInstruction = (identifiers) => {
|
|
13
|
+
return `Donner l'écriture décimale du nombre suivant :
|
|
14
|
+
|
|
15
|
+
$$
|
|
16
|
+
${getStartStatement(identifiers)}
|
|
17
|
+
$$`;
|
|
18
|
+
};
|
|
19
|
+
const getAnswer = (identifiers) => {
|
|
20
|
+
const { decimal, tenPower } = identifiers;
|
|
21
|
+
const decScientific = new Decimal(decimal);
|
|
14
22
|
const answer = decScientific.multiplyByPowerOfTen(tenPower).toTree().toTex();
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
return answer;
|
|
24
|
+
};
|
|
25
|
+
const getHint = (identifiers) => {
|
|
26
|
+
const { decimal, tenPower } = identifiers;
|
|
27
|
+
return `Si $x$ est un entier négatif, alors multiplier par $10^x$ revient à déplacer la virgule de $x$ rangs vers la gauche.
|
|
28
|
+
|
|
29
|
+
Si $x$ est un entier positif, alors multiplier par $10^x$ revient à déplacer la virgule de $x$ rangs vers la droite.`;
|
|
30
|
+
};
|
|
31
|
+
const getCorrection = (identifiers) => {
|
|
32
|
+
const { decimal, tenPower } = identifiers;
|
|
33
|
+
return `On déplace la virgule de $${Math.abs(tenPower)}$ rangs vers la ${tenPower < 0 ? "gauche" : "droite"} :
|
|
34
|
+
|
|
35
|
+
$$
|
|
36
|
+
${getStartStatement(identifiers)} = ${getAnswer(identifiers)}
|
|
37
|
+
$$`;
|
|
38
|
+
};
|
|
39
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
40
|
+
const { decimal, tenPower } = identifiers;
|
|
17
41
|
const question = {
|
|
18
|
-
instruction:
|
|
19
|
-
startStatement:
|
|
20
|
-
answer:
|
|
42
|
+
instruction: getInstruction(identifiers),
|
|
43
|
+
startStatement: getStartStatement(identifiers),
|
|
44
|
+
answer: getAnswer(identifiers),
|
|
21
45
|
keys: [],
|
|
22
46
|
answerFormat: "tex",
|
|
23
|
-
identifiers
|
|
47
|
+
identifiers,
|
|
48
|
+
hint: getHint(identifiers),
|
|
49
|
+
correction: getCorrection(identifiers),
|
|
24
50
|
};
|
|
25
51
|
return question;
|
|
26
52
|
};
|
|
53
|
+
const getStartStatement = (identifiers) => {
|
|
54
|
+
const { decimal, tenPower } = identifiers;
|
|
55
|
+
const statement = new MultiplyNode(new NumberNode(decimal), new PowerNode(new NumberNode(10), new NumberNode(tenPower)));
|
|
56
|
+
const statementTex = statement.toTex();
|
|
57
|
+
return statementTex;
|
|
58
|
+
};
|
|
59
|
+
const getScientificToDecimalQuestion = () => {
|
|
60
|
+
const decScientific = DecimalConstructor.randomScientific(randint(1, 4));
|
|
61
|
+
const tenPower = randint(-5, 6, [0, 1]);
|
|
62
|
+
const identifiers = { decimal: decScientific.value, tenPower };
|
|
63
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
64
|
+
};
|
|
27
65
|
const getPropositions = (n, { answer, tenPower, decimal }) => {
|
|
28
66
|
const propositions = [];
|
|
29
67
|
const decScientific = new Decimal(decimal);
|
|
@@ -39,7 +77,7 @@ const getPropositions = (n, { answer, tenPower, decimal }) => {
|
|
|
39
77
|
return shuffleProps(propositions, n);
|
|
40
78
|
};
|
|
41
79
|
const isAnswerValid = (ans, { answer }) => {
|
|
42
|
-
return ans
|
|
80
|
+
return numberVEA(ans, answer);
|
|
43
81
|
};
|
|
44
82
|
export const scientificToDecimal = {
|
|
45
83
|
id: "scientificToDecimal",
|
|
@@ -52,4 +90,6 @@ export const scientificToDecimal = {
|
|
|
52
90
|
getPropositions,
|
|
53
91
|
isAnswerValid,
|
|
54
92
|
subject: "Mathématiques",
|
|
93
|
+
getQuestionFromIdentifiers,
|
|
94
|
+
hasHintAndCorrection: true,
|
|
55
95
|
};
|