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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicSystemResolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/basicSystemResolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"basicSystemResolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/basicSystemResolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAMtE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,EAAE,EAAE,CAAC;CAIhC,CAAC;AAoGF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAiBvD,CAAC"}
|
|
@@ -34,6 +34,26 @@ const getBasicSystemResolutionQuestion = () => {
|
|
|
34
34
|
};
|
|
35
35
|
return getQuestionFromIdentifiers(identifiers);
|
|
36
36
|
};
|
|
37
|
+
const getHint = (identifiers) => {
|
|
38
|
+
return `On peut utilise la méthode par substitution ou bien celle par combinaison :
|
|
39
|
+
|
|
40
|
+
- Si une des variables est facile à isoler dans une des équations, alors on utilise la méthode par substitution : on isole cette variable, puis on injecte le résultat obtenu dans l'autre équation.
|
|
41
|
+
|
|
42
|
+
- Sinon, on utilise la méthode par combinaison : on multiple une (ou les deux) équation(s) par un nombre, afin que lorsqu'on additionne les deux équations, une des variables disparaisse.`;
|
|
43
|
+
};
|
|
44
|
+
const getCorrection = (identifiers) => {
|
|
45
|
+
const sys = GeneralSystemConstructor.fromIdentifiers(identifiers);
|
|
46
|
+
let corr = "";
|
|
47
|
+
corr += sys.toCorrectionTex();
|
|
48
|
+
corr += `
|
|
49
|
+
|
|
50
|
+
La solution du système est donc le couple :
|
|
51
|
+
|
|
52
|
+
$$
|
|
53
|
+
${getAnswer(identifiers)}
|
|
54
|
+
$$`;
|
|
55
|
+
return corr;
|
|
56
|
+
};
|
|
37
57
|
const getQuestionFromIdentifiers = (identifiers) => {
|
|
38
58
|
const question = {
|
|
39
59
|
answer: getAnswer(identifiers),
|
|
@@ -41,6 +61,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
41
61
|
keys: [],
|
|
42
62
|
answerFormat: "tex",
|
|
43
63
|
identifiers,
|
|
64
|
+
hint: getHint(identifiers),
|
|
65
|
+
correction: getCorrection(identifiers),
|
|
44
66
|
};
|
|
45
67
|
return question;
|
|
46
68
|
};
|
|
@@ -82,4 +104,5 @@ export const basicSystemResolution = {
|
|
|
82
104
|
subject: "Mathématiques",
|
|
83
105
|
getQuestionFromIdentifiers,
|
|
84
106
|
rebuildIdentifiers,
|
|
107
|
+
hasHintAndCorrection: true,
|
|
85
108
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifySystemSolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/verifySystemSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"verifySystemSolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/verifySystemSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,wBAAwB,EACzB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IAGjB,MAAM,EAAE,wBAAwB,CAAC;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkIF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAgBtD,CAAC"}
|
|
@@ -44,11 +44,59 @@ const getVerifySystemSolutionQuestion = () => {
|
|
|
44
44
|
const identifiers = { sysIds: sys.toIdentifiers(), x, y };
|
|
45
45
|
return getQuestionFromIdentifiers(identifiers);
|
|
46
46
|
};
|
|
47
|
+
const getHint = (identifiers) => {
|
|
48
|
+
return `On remplace $x$ par $${identifiers.x}$ et $y$ par $${identifiers.y}$ dans les deux équations.
|
|
49
|
+
|
|
50
|
+
Si les deux égalités sont vraies, alors le couple est bien une solution du système. Sinon, ce n'en est pas une.`;
|
|
51
|
+
};
|
|
52
|
+
const getCorrection = (identifiers) => {
|
|
53
|
+
const { sysIds, x, y } = identifiers;
|
|
54
|
+
const sys = GeneralSystemConstructor.fromIdentifiers(sysIds);
|
|
55
|
+
const equas = sys.getEqualNodes();
|
|
56
|
+
const equasDetailed = equas.map((e) => e.toDetailedEvaluation({
|
|
57
|
+
x: x.toTree(),
|
|
58
|
+
y: y.toTree(),
|
|
59
|
+
}));
|
|
60
|
+
const equasDetailedSimp = equasDetailed.map((e) => e.simplify());
|
|
61
|
+
const firstIsTrue = equasDetailedSimp[0].isVerified();
|
|
62
|
+
const secondIsTrue = equasDetailedSimp[1].isVerified();
|
|
63
|
+
return `On remplace $x$ par $${x}$ et $y$ par $${y}$ dans les deux équations :
|
|
64
|
+
|
|
65
|
+
$$
|
|
66
|
+
${equasDetailed[0].leftChild.toTex()} = ${equasDetailedSimp[0].leftChild.toTex()}
|
|
67
|
+
$$
|
|
68
|
+
|
|
69
|
+
${firstIsTrue
|
|
70
|
+
? "La première équation est donc bien vérifiée."
|
|
71
|
+
: "La première équation n'est donc pas vérifiée : le couple n'est donc pas une solution du système."}
|
|
72
|
+
|
|
73
|
+
${firstIsTrue
|
|
74
|
+
? `
|
|
75
|
+
|
|
76
|
+
On vérifie maintenant la deuxième équation :
|
|
77
|
+
|
|
78
|
+
$$
|
|
79
|
+
${equasDetailed[1].leftChild.toTex()} = ${equasDetailedSimp[1].leftChild.toTex()}
|
|
80
|
+
$$
|
|
81
|
+
|
|
82
|
+
${secondIsTrue
|
|
83
|
+
? "La deuxième équation est donc bien vérifiée."
|
|
84
|
+
: "La deuxième équation n'est donc pas vérifiée : le couple n'est donc pas une solution du système."}
|
|
85
|
+
`
|
|
86
|
+
: ""}
|
|
87
|
+
|
|
88
|
+
${firstIsTrue && secondIsTrue
|
|
89
|
+
? "Les deux équations sont donc bien vérifiées : le couple est bien une solution du système."
|
|
90
|
+
: ""}
|
|
91
|
+
`;
|
|
92
|
+
};
|
|
47
93
|
const getQuestionFromIdentifiers = (identifiers) => {
|
|
48
94
|
const question = {
|
|
49
95
|
instruction: getInstruction(identifiers),
|
|
50
96
|
answerFormat: "raw",
|
|
51
97
|
identifiers,
|
|
98
|
+
hint: getHint(identifiers),
|
|
99
|
+
correction: getCorrection(identifiers),
|
|
52
100
|
};
|
|
53
101
|
return question;
|
|
54
102
|
};
|
|
@@ -77,4 +125,5 @@ export const verifySystemSolution = {
|
|
|
77
125
|
answerType: "QCU",
|
|
78
126
|
getQuestionFromIdentifiers,
|
|
79
127
|
rebuildIdentifiers,
|
|
128
|
+
hasHintAndCorrection: true,
|
|
80
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capacityConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/capacityConversion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"capacityConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/capacityConversion.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,QAAQ,EAaT,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA0HF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Decimal, DecimalConstructor, } from "../../../math/numbers/decimals/decimal.js";
|
|
2
2
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
3
|
+
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
4
|
+
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
3
5
|
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
4
6
|
import { doWhile } from "../../../utils/doWhile.js";
|
|
7
|
+
import { alignTex } from "../../../utils/latex/alignTex.js";
|
|
5
8
|
import { addValidProp, tryToAddWrongProp, } from "../../exercise.js";
|
|
6
9
|
import { getDistinctQuestions } from "../../utils/getDistinctQuestions.js";
|
|
7
10
|
const units = ["mL", "cL", "dL", "L", "daL", "hL", "kL"];
|
|
@@ -9,19 +12,72 @@ const getCapacityConversion = () => {
|
|
|
9
12
|
const randomUnitIndex = randint(0, 7);
|
|
10
13
|
const randomUnitInstructionIndex = randint(0, 7, [randomUnitIndex]);
|
|
11
14
|
const randomCapacity = doWhile(() => DecimalConstructor.random(0, 1000, randint(0, 4)), (x) => x.value === 0);
|
|
12
|
-
const
|
|
15
|
+
const identifiers = {
|
|
16
|
+
randomCapacity: randomCapacity.value,
|
|
17
|
+
randomUnitIndex,
|
|
18
|
+
randomUnitInstructionIndex,
|
|
19
|
+
};
|
|
20
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
21
|
+
};
|
|
22
|
+
const getInstruction = (identifiers) => {
|
|
23
|
+
const { randomCapacity, randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
24
|
+
return `Compléter :
|
|
25
|
+
|
|
26
|
+
$$
|
|
27
|
+
${randomCapacity.frenchify()} \\textrm{${units[randomUnitIndex]}} = \\ldots \\textrm{${units[randomUnitInstructionIndex]}}
|
|
28
|
+
$$`;
|
|
29
|
+
};
|
|
30
|
+
const getAnswer = (identifiers) => {
|
|
31
|
+
const { randomCapacity, randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
32
|
+
const answer = new Decimal(randomCapacity)
|
|
33
|
+
.multiplyByPowerOfTen(randomUnitIndex - randomUnitInstructionIndex)
|
|
34
|
+
.value.frenchify();
|
|
35
|
+
return answer;
|
|
36
|
+
};
|
|
37
|
+
const getHint = (identifiers) => {
|
|
38
|
+
const { randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
39
|
+
const unit = units[randomUnitIndex];
|
|
40
|
+
const target = units[randomUnitInstructionIndex];
|
|
41
|
+
const space = randomUnitIndex - randomUnitInstructionIndex;
|
|
42
|
+
return `On rappelle que :
|
|
43
|
+
|
|
44
|
+
$$
|
|
45
|
+
1 \\ \\textrm{${unit}} = ${space > 0 ? Math.pow(10, space) : frac(1, Math.pow(10, -space)).toTex()} \\ \\textrm{${target}}
|
|
46
|
+
$$`;
|
|
47
|
+
};
|
|
48
|
+
const getCorrection = (identifiers) => {
|
|
49
|
+
const { randomCapacity, randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
50
|
+
const unit = units[randomUnitIndex];
|
|
51
|
+
const target = units[randomUnitInstructionIndex];
|
|
52
|
+
const space = randomUnitIndex - randomUnitInstructionIndex;
|
|
53
|
+
const coeff = space > 0 ? Math.pow(10, space).toTree() : frac(1, Math.pow(10, -space));
|
|
54
|
+
return `On sait que :
|
|
55
|
+
|
|
56
|
+
$$
|
|
57
|
+
1 \\ \\textrm{${unit}} = ${coeff.toTex()} \\ \\textrm{${target}}
|
|
58
|
+
$$
|
|
59
|
+
|
|
60
|
+
Il suffit alors de multiplier $${randomCapacity.frenchify()}$ par $${coeff.toTex()}$ :
|
|
61
|
+
|
|
62
|
+
${alignTex([
|
|
63
|
+
[
|
|
64
|
+
`${randomCapacity.frenchify()} \\textrm{${unit}} `,
|
|
65
|
+
"=",
|
|
66
|
+
`${multiply(coeff, randomCapacity).toTex()}\\ \\textrm{${target}}`,
|
|
67
|
+
],
|
|
68
|
+
["", "=", `${getAnswer(identifiers)}\\ \\textrm{${target}}`],
|
|
69
|
+
])}
|
|
70
|
+
`;
|
|
71
|
+
};
|
|
72
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
13
73
|
const question = {
|
|
14
|
-
instruction:
|
|
15
|
-
|
|
16
|
-
.replace(".", ",")} \\textrm{${units[randomUnitIndex]}} = \\ldots \\textrm{${units[randomUnitInstructionIndex]}}$`,
|
|
17
|
-
answer,
|
|
74
|
+
instruction: getInstruction(identifiers),
|
|
75
|
+
answer: getAnswer(identifiers),
|
|
18
76
|
keys: [],
|
|
19
77
|
answerFormat: "tex",
|
|
20
|
-
identifiers
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
randomUnitInstructionIndex,
|
|
24
|
-
},
|
|
78
|
+
identifiers,
|
|
79
|
+
hint: getHint(identifiers),
|
|
80
|
+
correction: getCorrection(identifiers),
|
|
25
81
|
};
|
|
26
82
|
return question;
|
|
27
83
|
};
|
|
@@ -46,12 +102,12 @@ export const capacityConversion = {
|
|
|
46
102
|
connector: "=",
|
|
47
103
|
getPropositions,
|
|
48
104
|
label: "Conversion de capacités",
|
|
49
|
-
levels: ["6ème", "5ème", "CAP", "2ndPro"],
|
|
50
|
-
sections: ["Conversions"],
|
|
51
105
|
isSingleStep: true,
|
|
52
106
|
generator: (nb) => getDistinctQuestions(getCapacityConversion, nb),
|
|
53
107
|
qcmTimer: 60,
|
|
54
108
|
freeTimer: 60,
|
|
55
109
|
isAnswerValid,
|
|
56
110
|
subject: "Mathématiques",
|
|
111
|
+
getQuestionFromIdentifiers,
|
|
112
|
+
hasHintAndCorrection: true,
|
|
57
113
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hoursToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/hoursToDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"hoursToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/hoursToDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAwIF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -3,28 +3,88 @@ import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuesti
|
|
|
3
3
|
import { DecimalConstructor, } from "../../../math/numbers/decimals/decimal.js";
|
|
4
4
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
5
|
import { round } from "../../../math/utils/round.js";
|
|
6
|
+
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
7
|
+
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
6
8
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const dec
|
|
10
|
-
const hours = Math.floor(dec
|
|
11
|
-
const mins = round((dec
|
|
12
|
-
const decTex = dec.
|
|
9
|
+
import { approxOrEqual } from "../../../utils/latex/approxOrEqual.js";
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { dec, isDecimalToHours } = identifiers;
|
|
12
|
+
const hours = Math.floor(dec);
|
|
13
|
+
const mins = round((dec - hours) * 100 * 0.6, 0);
|
|
14
|
+
const decTex = dec.frenchify();
|
|
13
15
|
const durationTex = isDecimalToHours
|
|
14
|
-
? decTex + "\\
|
|
15
|
-
: `${hours}\\
|
|
16
|
+
? decTex + "\\ \\textrm{h}"
|
|
17
|
+
: `${hours}\\ \\textrm{h}\\ ${mins}\\ \\textrm{min}`;
|
|
18
|
+
return `Convertir la durée suivante en ${isDecimalToHours ? "heures et minutes" : "$\\ \\textrm{h}$ (nombre décimal)"} :
|
|
19
|
+
|
|
20
|
+
$$
|
|
21
|
+
${durationTex}
|
|
22
|
+
$$
|
|
23
|
+
|
|
24
|
+
Arrondir ${isDecimalToHours ? "à la minute près" : "au centième près"}.`;
|
|
25
|
+
};
|
|
26
|
+
const getAnswer = (identifiers) => {
|
|
27
|
+
const { dec, isDecimalToHours } = identifiers;
|
|
28
|
+
const hours = Math.floor(dec);
|
|
29
|
+
const mins = round((dec - hours) * 100 * 0.6, 0);
|
|
16
30
|
const answer = isDecimalToHours
|
|
17
31
|
? `${hours}\\text{h}${mins}\\text{min}`
|
|
18
32
|
: `${hours},${round((mins / 60) * 100, 0)}\\text{h}`;
|
|
33
|
+
return answer;
|
|
34
|
+
};
|
|
35
|
+
const getHint = (identifiers) => {
|
|
36
|
+
const { dec, isDecimalToHours } = identifiers;
|
|
37
|
+
const hours = Math.floor(dec);
|
|
38
|
+
const mins = round((dec - hours) * 100 * 0.6, 0);
|
|
39
|
+
if (isDecimalToHours) {
|
|
40
|
+
return `Dans $1\\ \\text{h}$, il y a $60$ minutes. Un calcul de proportionnalité permet donc de déterminer combien y a-t-il de minutes dans $${dec.frenchify()} \\text{h}$.`;
|
|
41
|
+
}
|
|
42
|
+
return `$60$ minutes correspondent à $1 \\ \\text{h}$. Un calcul de proportionnalité permet donc de convertir $${mins} \\ \\text{min}$ en heures.`;
|
|
43
|
+
};
|
|
44
|
+
const getCorrection = (identifiers) => {
|
|
45
|
+
const { dec, isDecimalToHours } = identifiers;
|
|
46
|
+
const hours = Math.floor(dec);
|
|
47
|
+
const mins = round((dec - hours) * 100 * 0.6, 0);
|
|
48
|
+
const fracDec = round(dec - Math.floor(dec), 2);
|
|
49
|
+
if (isDecimalToHours) {
|
|
50
|
+
return `Dans $1\\ \\text{h}$, il y a $60$ minutes. Un calcul de proportionnalité permet donc de déterminer combien y a-t-il de minutes dans $${fracDec.frenchify()} \\text{h}$ :
|
|
51
|
+
|
|
52
|
+
$$
|
|
53
|
+
${multiply(fracDec, 60).toTex()} ${approxOrEqual(fracDec * 60, 0).join("")}
|
|
54
|
+
$$
|
|
55
|
+
|
|
56
|
+
$${dec.frenchify()}\\ \\text{h}$ correspond donc à $${getAnswer(identifiers)}$.`;
|
|
57
|
+
}
|
|
58
|
+
return `$60$ minutes correspondent à $1 \\ \\text{h}$. Un calcul de proportionnalité permet donc de convertir $${mins} \\ \\text{min}$ en heures :
|
|
59
|
+
|
|
60
|
+
$$
|
|
61
|
+
${frac(mins, 60).toTex()} ${approxOrEqual(mins / 60, 2).join("")}
|
|
62
|
+
$$
|
|
63
|
+
|
|
64
|
+
Le résultat attendu est donc :
|
|
65
|
+
|
|
66
|
+
$$
|
|
67
|
+
${getAnswer(identifiers)}
|
|
68
|
+
$$`;
|
|
69
|
+
};
|
|
70
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
19
71
|
const question = {
|
|
20
|
-
answer,
|
|
21
|
-
instruction:
|
|
72
|
+
answer: getAnswer(identifiers),
|
|
73
|
+
instruction: getInstruction(identifiers),
|
|
22
74
|
keys: ["hours", "minutes"],
|
|
23
75
|
answerFormat: "tex",
|
|
24
|
-
identifiers
|
|
76
|
+
identifiers,
|
|
77
|
+
hint: getHint(identifiers),
|
|
78
|
+
correction: getCorrection(identifiers),
|
|
25
79
|
};
|
|
26
80
|
return question;
|
|
27
81
|
};
|
|
82
|
+
const getHoursToDecimalQuestion = () => {
|
|
83
|
+
const isDecimalToHours = coinFlip();
|
|
84
|
+
const dec = DecimalConstructor.random(0, 3, 2);
|
|
85
|
+
const identifiers = { isDecimalToHours, dec: dec.value };
|
|
86
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
87
|
+
};
|
|
28
88
|
const getPropositions = (n, { answer, isDecimalToHours, dec }) => {
|
|
29
89
|
const propositions = [];
|
|
30
90
|
addValidProp(propositions, answer);
|
|
@@ -49,8 +109,6 @@ const getPropositions = (n, { answer, isDecimalToHours, dec }) => {
|
|
|
49
109
|
const isAnswerValid = (ans, { answer, isDecimalToHours, dec }) => {
|
|
50
110
|
if (isDecimalToHours)
|
|
51
111
|
return ans === answer;
|
|
52
|
-
// const hours = Math.floor(dec);
|
|
53
|
-
// const mins = round((dec - hours) * 100 * 0.6, 0);
|
|
54
112
|
const texs = [answer, answer.replace("\\text{h}", "")];
|
|
55
113
|
return texs.includes(ans);
|
|
56
114
|
};
|
|
@@ -58,13 +116,13 @@ export const hoursToDecimal = {
|
|
|
58
116
|
id: "hoursToDecimal",
|
|
59
117
|
connector: "=",
|
|
60
118
|
label: "Convertir une durée en nombre décimal et inversement",
|
|
61
|
-
levels: ["2nde", "2ndPro", "3ème"],
|
|
62
119
|
isSingleStep: true,
|
|
63
|
-
sections: ["Conversions"],
|
|
64
120
|
generator: (nb) => getDistinctQuestions(getHoursToDecimalQuestion, nb),
|
|
65
121
|
qcmTimer: 60,
|
|
66
122
|
freeTimer: 60,
|
|
67
123
|
getPropositions,
|
|
68
124
|
isAnswerValid,
|
|
69
125
|
subject: "Mathématiques",
|
|
126
|
+
getQuestionFromIdentifiers,
|
|
127
|
+
hasHintAndCorrection: true,
|
|
70
128
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lengthConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/lengthConversion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lengthConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/lengthConversion.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,QAAQ,EAgBT,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AACF,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AA2KF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAkB3D,CAAC"}
|
|
@@ -3,9 +3,12 @@ import { Decimal, DecimalConstructor, } from "../../../math/numbers/decimals/dec
|
|
|
3
3
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
4
4
|
import { Measure } from "../../../pc/measure/measure.js";
|
|
5
5
|
import { DistanceUnit } from "../../../pc/units/distanceUnits.js";
|
|
6
|
+
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
7
|
+
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
6
8
|
import { random } from "../../../utils/alea/random.js";
|
|
7
9
|
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
8
10
|
import { doWhile } from "../../../utils/doWhile.js";
|
|
11
|
+
import { alignTex } from "../../../utils/latex/alignTex.js";
|
|
9
12
|
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, tryToAddWrongProp, } from "../../exercise.js";
|
|
10
13
|
import { getDistinctQuestions } from "../../utils/getDistinctQuestions.js";
|
|
11
14
|
const units = ["mm", "cm", "dm", "m", "dam", "hm", "km"];
|
|
@@ -18,11 +21,50 @@ const unitsObj = [
|
|
|
18
21
|
DistanceUnit.hm,
|
|
19
22
|
DistanceUnit.km,
|
|
20
23
|
];
|
|
24
|
+
const getHint = (identifiers) => {
|
|
25
|
+
const { randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
26
|
+
const unit = units[randomUnitIndex];
|
|
27
|
+
const target = units[randomUnitInstructionIndex];
|
|
28
|
+
const space = randomUnitIndex - randomUnitInstructionIndex;
|
|
29
|
+
return `On rappelle que :
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
1 \\ \\textrm{${unit}} = ${space > 0 ? Math.pow(10, space) : frac(1, Math.pow(10, -space)).toTex()} \\ \\textrm{${target}}
|
|
33
|
+
$$`;
|
|
34
|
+
};
|
|
35
|
+
const getCorrection = (identifiers) => {
|
|
36
|
+
const { randomLength, randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
37
|
+
const unit = units[randomUnitIndex];
|
|
38
|
+
const target = units[randomUnitInstructionIndex];
|
|
39
|
+
const space = randomUnitIndex - randomUnitInstructionIndex;
|
|
40
|
+
const coeff = space > 0 ? Math.pow(10, space).toTree() : frac(1, Math.pow(10, -space));
|
|
41
|
+
return `On sait que :
|
|
42
|
+
|
|
43
|
+
$$
|
|
44
|
+
1 \\ \\textrm{${unit}} = ${coeff.toTex()} \\ \\textrm{${target}}
|
|
45
|
+
$$
|
|
46
|
+
|
|
47
|
+
Il suffit alors de multiplier $${randomLength.frenchify()}$ par $${coeff.toTex()}$ :
|
|
48
|
+
|
|
49
|
+
${alignTex([
|
|
50
|
+
[
|
|
51
|
+
`${randomLength.frenchify()} \\textrm{${unit}} `,
|
|
52
|
+
"=",
|
|
53
|
+
`${multiply(coeff, randomLength).toTex()}\\ \\textrm{${target}}`,
|
|
54
|
+
],
|
|
55
|
+
["", "=", `${getAnswer(identifiers)}\\ \\textrm{${target}}`],
|
|
56
|
+
])}
|
|
57
|
+
`;
|
|
58
|
+
};
|
|
21
59
|
const getInstruction = (identifiers, options) => {
|
|
22
60
|
const measure = new Measure(identifiers.randomLength, 0, unitsObj[identifiers.randomUnitIndex]);
|
|
23
|
-
return `Compléter :
|
|
61
|
+
return `Compléter :
|
|
62
|
+
|
|
63
|
+
$$
|
|
64
|
+
${measure.toTex({
|
|
24
65
|
notScientific: true,
|
|
25
|
-
})} = \\ldots ${unitsObj[identifiers.randomUnitInstructionIndex].toTex()}
|
|
66
|
+
})} = \\ldots ${unitsObj[identifiers.randomUnitInstructionIndex].toTex()}
|
|
67
|
+
$$`;
|
|
26
68
|
};
|
|
27
69
|
const getAnswer = (identifiers, options) => {
|
|
28
70
|
const measure = new Measure(identifiers.randomLength, 0, unitsObj[identifiers.randomUnitIndex]);
|
|
@@ -31,12 +73,12 @@ const getAnswer = (identifiers, options) => {
|
|
|
31
73
|
.toTex({ notScientific: true, hideUnit: true });
|
|
32
74
|
return answer;
|
|
33
75
|
};
|
|
34
|
-
const getLengthConversion = (
|
|
76
|
+
const getLengthConversion = (opts) => {
|
|
35
77
|
// if (options && !validateOptions(options).valid)
|
|
36
78
|
// throw Error("options invalides, gen lengthConversion");
|
|
37
79
|
const availableUnitsIndexes = units
|
|
38
80
|
.map((e, i) => i)
|
|
39
|
-
.filter((i) => !
|
|
81
|
+
.filter((i) => !opts?.units?.length || opts.units.includes(units[i]));
|
|
40
82
|
const randomUnitIndex = random(availableUnitsIndexes);
|
|
41
83
|
const randomUnitInstructionIndex = random(availableUnitsIndexes, [
|
|
42
84
|
randomUnitIndex,
|
|
@@ -47,12 +89,17 @@ const getLengthConversion = (options) => {
|
|
|
47
89
|
randomUnitIndex,
|
|
48
90
|
randomUnitInstructionIndex,
|
|
49
91
|
};
|
|
92
|
+
return getQuestionFromIdentifiers(identifiers, opts);
|
|
93
|
+
};
|
|
94
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
50
95
|
const question = {
|
|
51
|
-
instruction: getInstruction(identifiers,
|
|
52
|
-
answer: getAnswer(identifiers,
|
|
96
|
+
instruction: getInstruction(identifiers, opts),
|
|
97
|
+
answer: getAnswer(identifiers, opts),
|
|
53
98
|
keys: [],
|
|
54
99
|
answerFormat: "tex",
|
|
55
100
|
identifiers,
|
|
101
|
+
hint: getHint(identifiers),
|
|
102
|
+
correction: getCorrection(identifiers),
|
|
56
103
|
};
|
|
57
104
|
return question;
|
|
58
105
|
};
|
|
@@ -107,4 +154,6 @@ export const lengthConversion = {
|
|
|
107
154
|
getInstruction,
|
|
108
155
|
options,
|
|
109
156
|
validateOptions,
|
|
157
|
+
hasHintAndCorrection: true,
|
|
158
|
+
getQuestionFromIdentifiers,
|
|
110
159
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"massConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/massConversion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"massConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/massConversion.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,QAAQ,EAaT,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA6HF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -1,31 +1,87 @@
|
|
|
1
1
|
import { Decimal, DecimalConstructor, } from "../../../math/numbers/decimals/decimal.js";
|
|
2
2
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
3
|
+
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
4
|
+
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
3
5
|
import { numberParser } from "../../../tree/parsers/numberParser.js";
|
|
4
6
|
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
5
7
|
import { doWhile } from "../../../utils/doWhile.js";
|
|
8
|
+
import { alignTex } from "../../../utils/latex/alignTex.js";
|
|
6
9
|
import { addValidProp, tryToAddWrongProp, } from "../../exercise.js";
|
|
7
10
|
import { getDistinctQuestions } from "../../utils/getDistinctQuestions.js";
|
|
8
11
|
const units = ["mg", "cg", "dg", "g", "dag", "hg", "kg"];
|
|
9
|
-
const
|
|
10
|
-
const randomUnitIndex =
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
12
|
+
const getHint = (identifiers) => {
|
|
13
|
+
const { randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
14
|
+
const unit = units[randomUnitIndex];
|
|
15
|
+
const target = units[randomUnitInstructionIndex];
|
|
16
|
+
const space = randomUnitIndex - randomUnitInstructionIndex;
|
|
17
|
+
return `On rappelle que :
|
|
18
|
+
|
|
19
|
+
$$
|
|
20
|
+
1 \\ \\textrm{${unit}} = ${space > 0 ? Math.pow(10, space) : frac(1, Math.pow(10, -space)).toTex()} \\ \\textrm{${target}}
|
|
21
|
+
$$`;
|
|
22
|
+
};
|
|
23
|
+
const getCorrection = (identifiers) => {
|
|
24
|
+
const { randomMass, randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
25
|
+
const unit = units[randomUnitIndex];
|
|
26
|
+
const target = units[randomUnitInstructionIndex];
|
|
27
|
+
const space = randomUnitIndex - randomUnitInstructionIndex;
|
|
28
|
+
const coeff = space > 0 ? Math.pow(10, space).toTree() : frac(1, Math.pow(10, -space));
|
|
29
|
+
return `On sait que :
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
1 \\ \\textrm{${unit}} = ${coeff.toTex()} \\ \\textrm{${target}}
|
|
33
|
+
$$
|
|
34
|
+
|
|
35
|
+
Il suffit alors de multiplier $${randomMass.frenchify()}$ par $${coeff.toTex()}$ :
|
|
36
|
+
|
|
37
|
+
${alignTex([
|
|
38
|
+
[
|
|
39
|
+
`${randomMass.frenchify()} \\textrm{${unit}} `,
|
|
40
|
+
"=",
|
|
41
|
+
`${multiply(coeff, randomMass).toTex()}\\ \\textrm{${target}}`,
|
|
42
|
+
],
|
|
43
|
+
["", "=", `${getAnswer(identifiers)}\\ \\textrm{${target}}`],
|
|
44
|
+
])}
|
|
45
|
+
`;
|
|
46
|
+
};
|
|
47
|
+
const getInstruction = (identifiers) => {
|
|
48
|
+
const { randomMass, randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
49
|
+
return `Compléter :
|
|
50
|
+
|
|
51
|
+
$$
|
|
52
|
+
${randomMass.frenchify()} \\textrm{${units[randomUnitIndex]}} = \\ldots \\textrm{${units[randomUnitInstructionIndex]}}
|
|
53
|
+
$$`;
|
|
54
|
+
};
|
|
55
|
+
const getAnswer = (identifiers) => {
|
|
56
|
+
const { randomMass, randomUnitIndex, randomUnitInstructionIndex } = identifiers;
|
|
57
|
+
const answer = new Decimal(randomMass)
|
|
58
|
+
.multiplyByPowerOfTen(randomUnitIndex - randomUnitInstructionIndex)
|
|
59
|
+
.value.frenchify();
|
|
60
|
+
return answer;
|
|
61
|
+
};
|
|
62
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
14
63
|
const question = {
|
|
15
|
-
instruction:
|
|
16
|
-
|
|
17
|
-
.replace(".", ",")} \\textrm{${units[randomUnitIndex]}} = \\ldots \\textrm{${units[randomUnitInstructionIndex]}}$`,
|
|
18
|
-
answer,
|
|
64
|
+
instruction: getInstruction(identifiers),
|
|
65
|
+
answer: getAnswer(identifiers),
|
|
19
66
|
keys: [],
|
|
20
67
|
answerFormat: "tex",
|
|
21
|
-
identifiers
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
randomUnitInstructionIndex,
|
|
25
|
-
},
|
|
68
|
+
identifiers,
|
|
69
|
+
hint: getHint(identifiers),
|
|
70
|
+
correction: getCorrection(identifiers),
|
|
26
71
|
};
|
|
27
72
|
return question;
|
|
28
73
|
};
|
|
74
|
+
const getMassConversion = () => {
|
|
75
|
+
const randomUnitIndex = randint(0, 7);
|
|
76
|
+
const randomUnitInstructionIndex = randint(0, 7, [randomUnitIndex]);
|
|
77
|
+
const randomMass = doWhile(() => DecimalConstructor.random(0, 1000, randint(0, 4)), (x) => x.value === 0);
|
|
78
|
+
const identifiers = {
|
|
79
|
+
randomMass: randomMass.value,
|
|
80
|
+
randomUnitIndex,
|
|
81
|
+
randomUnitInstructionIndex,
|
|
82
|
+
};
|
|
83
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
84
|
+
};
|
|
29
85
|
const getPropositions = (n, { answer, randomMass, randomUnitIndex, randomUnitInstructionIndex }) => {
|
|
30
86
|
const propositions = [];
|
|
31
87
|
addValidProp(propositions, answer);
|
|
@@ -49,8 +105,6 @@ export const massConversion = {
|
|
|
49
105
|
id: "massConversion",
|
|
50
106
|
connector: "=",
|
|
51
107
|
label: "Conversion de masses",
|
|
52
|
-
levels: ["6ème", "5ème", "CAP", "2ndPro"],
|
|
53
|
-
sections: ["Conversions"],
|
|
54
108
|
isSingleStep: true,
|
|
55
109
|
generator: (nb) => getDistinctQuestions(getMassConversion, nb),
|
|
56
110
|
getPropositions,
|
|
@@ -58,4 +112,6 @@ export const massConversion = {
|
|
|
58
112
|
qcmTimer: 60,
|
|
59
113
|
freeTimer: 60,
|
|
60
114
|
subject: "Mathématiques",
|
|
115
|
+
getQuestionFromIdentifiers,
|
|
116
|
+
hasHintAndCorrection: true,
|
|
61
117
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/volumeConversion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"volumeConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/volumeConversion.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,QAAQ,EAaT,MAAM,mBAAmB,CAAC;AAE3B,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAgIF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
|