math-exercises 3.0.68 → 3.0.70
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/exercise.d.ts +9 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/addAndSub.d.ts.map +1 -1
- package/lib/exercises/math/calcul/addAndSub.js +4 -0
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.d.ts +3 -0
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.d.ts.map +1 -1
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +33 -20
- package/lib/exercises/math/calcul/digitDecimalRank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRank.js +36 -13
- package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRankNumber.js +27 -12
- package/lib/exercises/math/calcul/digitRank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitRank.js +37 -13
- package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitRankNumber.js +21 -12
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +55 -37
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +4 -4
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +31 -18
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +59 -35
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +33 -17
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.js +36 -18
- package/lib/exercises/math/calcul/mentalCaluls/mentalDivisions.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalDivisions.js +38 -30
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +35 -21
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +4 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.js +22 -9
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts +2 -1
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/expressionNature.js +36 -15
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts +2 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +26 -15
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.d.ts +2 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +26 -17
- package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +1 -0
- package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +89 -60
- package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/decimalOrdering.js +30 -13
- package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +26 -13
- package/lib/exercises/math/calcul/ordering/framing.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/framing.js +70 -59
- package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/integerOrdering.js +30 -11
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +4 -0
- package/lib/exercises/math/calcul/proportionality/isTableProportional.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportional.js +42 -24
- package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.js +4 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts +1 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/scaleUsage.js +75 -39
- package/lib/exercises/math/calcul/writing/index.d.ts +1 -1
- package/lib/exercises/math/calcul/writing/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/writing/index.js +3 -1
- package/lib/exercises/math/calcul/writing/numberToFrenchWriting.d.ts +0 -5
- package/lib/exercises/math/calcul/writing/numberToFrenchWriting.d.ts.map +1 -1
- package/lib/exercises/math/calcul/writing/numberToFrenchWriting.js +87 -64
- package/lib/exercises/math/calculLitteral/distributivity/allIdentities.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +29 -5
- package/lib/exercises/math/calculLitteral/distributivity/idRmq1.d.ts +2 -1
- package/lib/exercises/math/calculLitteral/distributivity/idRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/idRmq1.js +3 -3
- package/lib/exercises/math/calculLitteral/distributivity/idRmq2.d.ts +2 -1
- package/lib/exercises/math/calculLitteral/distributivity/idRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/idRmq2.js +3 -3
- package/lib/exercises/math/calculLitteral/distributivity/idRmq3.d.ts +2 -1
- package/lib/exercises/math/calculLitteral/distributivity/idRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/idRmq3.js +3 -3
- package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/facto1.js +3 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +1 -1
- package/lib/exercises/math/combinatory/anagrams.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/anagrams.js +18 -7
- package/lib/exercises/math/combinatory/ballsCounting.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/ballsCounting.js +8 -6
- package/lib/exercises/math/combinatory/diceCounting.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/diceCounting.js +62 -27
- package/lib/exercises/math/complex/addComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/addComplex.js +31 -18
- package/lib/exercises/math/complex/argumentFromAlgebraicComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/argumentFromAlgebraicComplex.js +24 -11
- package/lib/exercises/math/complex/conjugateComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/conjugateComplex.js +20 -7
- package/lib/exercises/math/complex/conjugateDivideComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/conjugateDivideComplex.js +29 -16
- package/lib/exercises/math/complex/conjugateMultiplyComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/conjugateMultiplyComplex.js +26 -13
- package/lib/exercises/math/complex/divideComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/divideComplex.js +29 -16
- package/lib/exercises/math/complex/inverseComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/inverseComplex.js +18 -7
- package/lib/exercises/math/complex/linearCombinaisonComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/linearCombinaisonComplex.js +30 -13
- package/lib/exercises/math/complex/moduloFromAlgebraicComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/moduloFromAlgebraicComplex.js +20 -8
- package/lib/exercises/math/complex/mutiplyComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/mutiplyComplex.js +26 -13
- package/lib/exercises/math/complex/reAndIm.d.ts.map +1 -1
- package/lib/exercises/math/complex/reAndIm.js +22 -9
- package/lib/exercises/math/conversion/volumeCapacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeCapacityConversion.js +1 -0
- package/lib/exercises/math/dataRepresentations/testGen.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/testGen.js +5 -1
- package/lib/exercises/math/dataRepresentations/testGenGGB.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/testGenGGB.js +5 -1
- package/lib/exercises/math/dataRepresentations/testGenStudentGGB.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/testGenStudentGGB.js +5 -1
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts.map +1 -1
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.js +4 -0
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts.map +1 -1
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.js +4 -0
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts.map +1 -1
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.js +4 -2
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +4 -2
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +4 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +4 -0
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.js +4 -2
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +4 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.js +4 -0
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts +2 -1
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.js +6 -4
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts +2 -1
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.js +4 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts +2 -1
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.js +4 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.js +4 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.js +4 -0
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts +2 -1
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.js +4 -10
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.js +32 -4
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.js +4 -2
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.js +4 -0
- package/lib/exercises/math/derivation/derivative/productDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/productDerivative.js +4 -0
- package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.js +4 -0
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.js +4 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +4 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.js +4 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.js +4 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.js +4 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.js +4 -0
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts +4 -3
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +32 -16
- package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +4 -0
- package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.js +4 -4
- package/lib/exercises/math/functions/absolute/absoluteValueEquations.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absoluteValueEquations.js +22 -10
- package/lib/exercises/math/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +22 -8
- package/lib/exercises/math/functions/affines/affineAdjustment.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustment.js +4 -4
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +4 -4
- package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.js +4 -4
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +4 -4
- package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.js +1 -0
- package/lib/exercises/math/functions/affines/affineMeanValue.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineMeanValue.js +33 -14
- package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.js +4 -4
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +4 -0
- package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +4 -5
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +4 -2
- package/lib/exercises/math/functions/basics/graphicEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicEquation.js +4 -2
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +4 -2
- package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequationAffine.js +4 -5
- package/lib/exercises/math/functions/basics/imageAntecedentFromSentence.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/imageAntecedentFromSentence.js +4 -3
- package/lib/exercises/math/functions/basics/inverseImageFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunction.js +4 -6
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +0 -2
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +16 -15
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.d.ts +1 -0
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +46 -32
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +4 -2
- package/lib/exercises/math/functions/cube/cubicEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/cube/cubicEquation.js +4 -3
- package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expFactorization.js +1 -0
- package/lib/exercises/math/functions/exponentials/exponentialsVariations.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponentials/exponentialsVariations.js +4 -1
- package/lib/exercises/math/functions/integral/integralAffines.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralAffines.js +4 -2
- package/lib/exercises/math/functions/integral/integralDerivatedUCosU.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralDerivatedUCosU.js +27 -12
- package/lib/exercises/math/functions/integral/integralDerivatedUSinU.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralDerivatedUSinU.js +26 -11
- package/lib/exercises/math/functions/integral/integralExpAxPlusB.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralExpAxPlusB.js +26 -11
- package/lib/exercises/math/functions/integral/integralExpU.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralExpU.js +38 -20
- package/lib/exercises/math/functions/integral/integralFractions.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralFractions.js +40 -21
- package/lib/exercises/math/functions/integral/integralKCosinus.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralKCosinus.js +29 -12
- package/lib/exercises/math/functions/integral/integralKSinus.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralKSinus.js +29 -12
- package/lib/exercises/math/functions/integral/integralTrinomials.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralTrinomials.js +4 -2
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts +0 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +36 -15
- package/lib/exercises/math/functions/logarithm/log10Simplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10Simplifying.js +43 -22
- package/lib/exercises/math/functions/logarithm/logEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/logEquation.js +20 -11
- package/lib/exercises/math/functions/logarithm/logPowerEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/logPowerEquation.js +26 -14
- package/lib/exercises/math/functions/logarithm/logSimplifiying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/logSimplifiying.js +4 -3
- package/lib/exercises/math/functions/parity/parityFromAlgebra.d.ts.map +1 -1
- package/lib/exercises/math/functions/parity/parityFromAlgebra.js +29 -13
- package/lib/exercises/math/functions/parity/parityFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/parity/parityFromGraph.js +30 -12
- package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.d.ts.map +1 -1
- package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.js +27 -14
- package/lib/exercises/math/functions/sign/affineProductSign.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/affineProductSign.js +4 -4
- package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
- package/lib/exercises/math/functions/square/squareImageInterval.js +39 -19
- package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.js +4 -3
- package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.js +26 -9
- package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.js +25 -10
- package/lib/exercises/math/functions/trinoms/equation/secondDegreeInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/secondDegreeInequation.js +73 -41
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.js +4 -2
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.js +4 -2
- package/lib/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.js +4 -4
- package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.js +4 -5
- package/lib/exercises/math/functions/trinoms/parabole/trinomSymetryAxisFromFacto.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/parabole/trinomSymetryAxisFromFacto.js +4 -4
- package/lib/exercises/math/functions/trinoms/roots/findSecondRoot.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/findSecondRoot.js +4 -4
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.js +4 -2
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.js +4 -2
- package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.js +4 -2
- package/lib/exercises/math/functions/trinoms/roots/rootsProduct.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsProduct.js +4 -4
- package/lib/exercises/math/functions/trinoms/roots/rootsReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsReading.js +4 -3
- package/lib/exercises/math/functions/trinoms/roots/rootsSum.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsSum.js +4 -4
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.js +4 -0
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromRoots.js +4 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.js +32 -11
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.js +32 -16
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.js +24 -9
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.js +24 -9
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.js +29 -12
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromDevForm.js +4 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromRoots.js +4 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitReading.js +4 -2
- package/lib/exercises/math/functions/trinoms/trinomialMeanValue.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/trinomialMeanValue.js +33 -14
- package/lib/exercises/math/geometry/areas/circleRadiusFromArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/circleRadiusFromArea.js +1 -0
- package/lib/exercises/math/geometry/areas/squareSideFromArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/squareSideFromArea.js +1 -0
- package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.js +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.d.ts +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.js +55 -27
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.js +4 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.js +4 -0
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.js +6 -2
- package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.js +7 -5
- package/lib/exercises/math/geometry/lines/isPointOnLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/isPointOnLine.js +4 -0
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +4 -0
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +4 -0
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.js +4 -0
- package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.js +4 -0
- package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.js +4 -0
- package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.js +4 -0
- package/lib/exercises/math/geometry/pythagore/isTriangleRight.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/isTriangleRight.js +4 -0
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.d.ts.map +1 -1
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.js +4 -0
- package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.d.ts.map +1 -1
- package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.js +4 -0
- package/lib/exercises/math/geometry/shapes/basicShapesNaming.d.ts +4 -1
- package/lib/exercises/math/geometry/shapes/basicShapesNaming.d.ts.map +1 -1
- package/lib/exercises/math/geometry/shapes/basicShapesNaming.js +97 -44
- package/lib/exercises/math/geometry/shapes/basicShapesRecognition.d.ts.map +1 -1
- package/lib/exercises/math/geometry/shapes/basicShapesRecognition.js +42 -23
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +8 -4
- package/lib/exercises/math/geometry/vectors/chasles.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/chasles.js +36 -12
- package/lib/exercises/math/geometry/vectors/coordinatesReading.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/coordinatesReading.js +28 -14
- package/lib/exercises/math/geometry/vectors/determinant.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/determinant.js +26 -12
- package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.js +25 -11
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts +1 -0
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +60 -33
- package/lib/exercises/math/geometry/vectors/fourthParallelogramPoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/fourthParallelogramPoint.js +34 -19
- package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +42 -20
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +42 -20
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +4 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +4 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +4 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaNorms.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaNorms.js +4 -0
- package/lib/exercises/math/geometry/vectors/traceOppositeVector.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/traceOppositeVector.js +4 -0
- package/lib/exercises/math/geometry/vectors/traceVectorDifference.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/traceVectorDifference.js +4 -0
- package/lib/exercises/math/geometry/vectors/traceVectorMultiple.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/traceVectorMultiple.js +4 -0
- package/lib/exercises/math/geometry/vectors/traceVectorSum.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/traceVectorSum.js +4 -0
- package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts +2 -0
- package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +45 -25
- package/lib/exercises/math/geometry/vectors/vectorLinearCombination.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/vectorLinearCombination.js +33 -14
- package/lib/exercises/math/geometry/vectors/vectorNormCalculation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/vectorNormCalculation.js +9 -3
- package/lib/exercises/math/limits/limitReading.d.ts +5 -1
- package/lib/exercises/math/limits/limitReading.d.ts.map +1 -1
- package/lib/exercises/math/limits/limitReading.js +96 -38
- package/lib/exercises/math/limits/polynomLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimit.js +0 -2
- package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.js +37 -20
- package/lib/exercises/math/limits/rationalFracLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/rationalFracLimit.js +34 -17
- package/lib/exercises/math/limits/sequenceGeometricLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequenceGeometricLimit.js +4 -0
- package/lib/exercises/math/limits/sequencePolynomLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequencePolynomLimit.js +23 -10
- package/lib/exercises/math/limits/sequencePolynomNoFILimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequencePolynomNoFILimit.js +24 -11
- package/lib/exercises/math/limits/sequencePolynomProductLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequencePolynomProductLimit.js +31 -18
- package/lib/exercises/math/limits/sequenceRationalFracLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequenceRationalFracLimit.js +33 -16
- package/lib/exercises/math/matrices/matrixGeneralTerm.d.ts.map +1 -1
- package/lib/exercises/math/matrices/matrixGeneralTerm.js +21 -8
- package/lib/exercises/math/matrices/matrixInversibilityDomain.d.ts.map +1 -1
- package/lib/exercises/math/matrices/matrixInversibilityDomain.js +44 -26
- package/lib/exercises/math/matrices/productCell.d.ts +2 -0
- package/lib/exercises/math/matrices/productCell.d.ts.map +1 -1
- package/lib/exercises/math/matrices/productCell.js +27 -12
- package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
- package/lib/exercises/math/powers/decimalToScientific.js +9 -0
- package/lib/exercises/math/primitive/constantPrimitive.d.ts +2 -1
- package/lib/exercises/math/primitive/constantPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/constantPrimitive.js +3 -3
- package/lib/exercises/math/primitive/exponentialPrimitive.d.ts +2 -1
- package/lib/exercises/math/primitive/exponentialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/exponentialPrimitive.js +3 -3
- package/lib/exercises/math/primitive/polynomialPrimitive.d.ts +2 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +3 -3
- package/lib/exercises/math/primitive/sinCosPrimitive.d.ts +2 -1
- package/lib/exercises/math/primitive/sinCosPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/sinCosPrimitive.js +3 -3
- package/lib/exercises/math/primitive/usualPrimitives.d.ts.map +1 -1
- package/lib/exercises/math/primitive/usualPrimitives.js +33 -6
- package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.js +1 -0
- package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartilesList.js +4 -1
- package/lib/exercises/math/probaStat/stats2var/averagePoint.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats2var/averagePoint.js +1 -2
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +47 -23
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +4 -6
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +4 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +30 -12
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.js +4 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +23 -9
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +62 -41
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +4 -2
- package/lib/exercises/math/sequences/arithmetic/arithmeticReasonUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticReasonUsage.js +4 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +26 -10
- package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +33 -14
- package/lib/exercises/math/sequences/arithmetic/firstIntegersSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/firstIntegersSum.js +4 -2
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +35 -14
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +37 -24
- package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromFirstTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromFirstTerms.js +4 -0
- package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.js +29 -15
- package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/explicitFormulaUsage.js +27 -10
- package/lib/exercises/math/sequences/genericSequenceVariations.d.ts.map +1 -1
- package/lib/exercises/math/sequences/genericSequenceVariations.js +23 -10
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +9 -3
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +45 -17
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +20 -9
- package/lib/exercises/math/sequences/geometric/geometricFindReason.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindReason.js +20 -9
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +60 -41
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +1 -0
- package/lib/exercises/math/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +26 -10
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.js +4 -0
- package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +27 -10
- package/lib/exercises/math/sequences/geometric/geometricVariations.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricVariations.js +4 -0
- package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/recurrenceFormulaUsage.js +23 -11
- package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/sequenceEvaluation.js +45 -21
- package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -2
- package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
- package/lib/exercises/pc/calibrationCurveOfSolution.js +56 -48
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +3 -1
- package/lib/exercises/pc/chemicalElements/weightPercent.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/weightPercent.js +1 -0
- package/lib/exercises/pc/chemicalEquations.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalEquations.js +0 -2
- package/lib/exercises/pc/chemicalReactions/chemicalEquations.d.ts +8 -0
- package/lib/exercises/pc/chemicalReactions/chemicalEquations.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/chemicalEquations.js +62 -0
- package/lib/exercises/pc/chemicalReactions/chemicalReactionsProduct.d.ts +9 -0
- package/lib/exercises/pc/chemicalReactions/chemicalReactionsProduct.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/chemicalReactionsProduct.js +70 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts +2 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/index.js +2 -0
- package/lib/exercises/pc/delution.d.ts.map +1 -1
- package/lib/exercises/pc/delution.js +25 -12
- package/lib/exercises/pc/dosage/concentrationCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/concentrationCalculation.js +5 -3
- package/lib/exercises/pc/electricity/calculateVoltage.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/calculateVoltage.js +112 -90
- package/lib/exercises/pc/electricity/electricEnergyFromPower.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/electricEnergyFromPower.js +1 -0
- package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -1
- package/lib/exercises/pc/energy/calorificValue.js +58 -29
- package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/energy/combustionTransferEnergy.js +52 -29
- package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -1
- package/lib/exercises/pc/energy/combustionTransferEnergy2.js +96 -67
- package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -1
- package/lib/exercises/pc/energy/efficencyOfConverter.js +53 -40
- package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/energy/efficiencyCalculation.js +68 -38
- package/lib/exercises/pc/energy/energyTransfer.d.ts +0 -2
- package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -1
- package/lib/exercises/pc/energy/energyTransfer.js +27 -11
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -1
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +111 -64
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +86 -38
- package/lib/exercises/pc/fluids/mariotte.d.ts.map +1 -1
- package/lib/exercises/pc/fluids/mariotte.js +40 -23
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +80 -52
- package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/electroStaticForce.js +73 -58
- package/lib/exercises/pc/forces/forceWork.d.ts.map +1 -1
- package/lib/exercises/pc/forces/forceWork.js +22 -7
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +87 -38
- package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionValue.js +31 -16
- package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalForcePlanets.js +71 -31
- package/lib/exercises/pc/forces/massWeight.d.ts.map +1 -1
- package/lib/exercises/pc/forces/massWeight.js +53 -20
- package/lib/exercises/pc/forces/pressingForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/pressingForce.js +71 -31
- package/lib/exercises/pc/formulaFromComposition.d.ts.map +1 -1
- package/lib/exercises/pc/formulaFromComposition.js +28 -8
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts.map +1 -1
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +31 -12
- package/lib/exercises/pc/index.d.ts +4 -6
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +4 -6
- package/lib/exercises/pc/kineticEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/kineticEnergy.js +22 -10
- package/lib/exercises/pc/math/isolateVariables.d.ts.map +1 -1
- package/lib/exercises/pc/math/isolateVariables.js +114 -32
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.d.ts.map +1 -1
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +34 -18
- package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -1
- package/lib/exercises/pc/mecanicalWaves/elongationReading.js +35 -13
- package/lib/exercises/pc/molarQuantity.d.ts.map +1 -1
- package/lib/exercises/pc/molarQuantity.js +29 -13
- package/lib/exercises/pc/mole/concentrationReading.d.ts +4 -1
- package/lib/exercises/pc/mole/concentrationReading.d.ts.map +1 -1
- package/lib/exercises/pc/mole/concentrationReading.js +28 -10
- package/lib/exercises/pc/mole/molFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/mole/molFromMass.js +21 -8
- package/lib/exercises/pc/mole/molFromMolarMass.d.ts.map +1 -1
- package/lib/exercises/pc/mole/molFromMolarMass.js +21 -8
- package/lib/exercises/pc/mole/molarMass.d.ts +3 -1
- package/lib/exercises/pc/mole/molarMass.d.ts.map +1 -1
- package/lib/exercises/pc/mole/molarMass.js +22 -9
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.d.ts.map +1 -1
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +25 -11
- package/lib/exercises/pc/mole/moleculeCountFromMol.d.ts.map +1 -1
- package/lib/exercises/pc/mole/moleculeCountFromMol.js +18 -7
- package/lib/exercises/pc/moleculeFormula.d.ts.map +1 -1
- package/lib/exercises/pc/moleculeFormula.js +30 -9
- package/lib/exercises/pc/moleculeNomenclature.d.ts.map +1 -1
- package/lib/exercises/pc/moleculeNomenclature.js +23 -8
- package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
- package/lib/exercises/pc/motion/averageSpeed.js +68 -55
- package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/motion/averageSpeedCalculation.js +97 -39
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts +4 -1
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts.map +1 -1
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +51 -49
- package/lib/exercises/pc/motion/motionReference.d.ts +1 -0
- package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -1
- package/lib/exercises/pc/motion/motionReference.js +47 -26
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts +1 -1
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -1
- package/lib/exercises/pc/motion/typeOfAcceleration.js +61 -62
- package/lib/exercises/pc/motion/typeOfMovement.d.ts +2 -1
- package/lib/exercises/pc/motion/typeOfMovement.d.ts.map +1 -1
- package/lib/exercises/pc/motion/typeOfMovement.js +58 -57
- package/lib/exercises/pc/orderOfMagnitude.d.ts.map +1 -1
- package/lib/exercises/pc/orderOfMagnitude.js +24 -23
- package/lib/exercises/pc/pH.d.ts.map +1 -1
- package/lib/exercises/pc/pH.js +37 -16
- package/lib/exercises/pc/perceivedFrequency.d.ts.map +1 -1
- package/lib/exercises/pc/perceivedFrequency.js +26 -13
- package/lib/exercises/pc/potentialEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/potentialEnergy.js +23 -11
- package/lib/exercises/pc/power/calculatePowerOfLight.d.ts +2 -2
- package/lib/exercises/pc/power/calculatePowerOfLight.d.ts.map +1 -1
- package/lib/exercises/pc/power/calculatePowerOfLight.js +65 -39
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts +3 -1
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts.map +1 -1
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +48 -47
- package/lib/exercises/pc/snellDescartes.d.ts.map +1 -1
- package/lib/exercises/pc/snellDescartes.js +31 -13
- package/lib/exercises/pc/sound/findPeriodFromGraph.d.ts.map +1 -1
- package/lib/exercises/pc/sound/findPeriodFromGraph.js +42 -26
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts +1 -0
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts.map +1 -1
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +51 -32
- package/lib/exercises/pc/sound/findSoundFrequencyFromPeriod.d.ts.map +1 -1
- package/lib/exercises/pc/sound/findSoundFrequencyFromPeriod.js +20 -7
- package/lib/exercises/pc/sound/findSoundPeriodFromFrequency.d.ts.map +1 -1
- package/lib/exercises/pc/sound/findSoundPeriodFromFrequency.js +20 -7
- package/lib/exercises/pc/sound/frequencyComparison.d.ts.map +1 -1
- package/lib/exercises/pc/sound/frequencyComparison.js +25 -14
- package/lib/exercises/pc/spectral/spectralEnergy.d.ts +1 -3
- package/lib/exercises/pc/spectral/spectralEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/spectral/spectralEnergy.js +98 -56
- package/lib/exercises/pc/waves/findDistanceFromEarth.d.ts.map +1 -1
- package/lib/exercises/pc/waves/findDistanceFromEarth.js +22 -9
- package/lib/exercises/pc/waves/lightDistanceConversion.d.ts.map +1 -1
- package/lib/exercises/pc/waves/lightDistanceConversion.js +104 -76
- package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts +1 -0
- package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -1
- package/lib/exercises/pc/waves/periodicWaveCelerity.js +81 -25
- package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -1
- package/lib/exercises/pc/weight/calculateWeight.js +55 -26
- package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
- package/lib/exercises/pc/weight/weightOnTheMoon.js +67 -32
- package/lib/index.d.ts +63 -41
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.js +7 -2
- package/lib/math/geometry/ray.d.ts +8 -1
- package/lib/math/geometry/ray.d.ts.map +1 -1
- package/lib/math/geometry/ray.js +11 -1
- package/lib/math/polynomials/trinom.d.ts +5 -0
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +6 -0
- package/lib/pc/constants/molecularChemistry/reaction.js +1 -1
- package/lib/pc/measure/measure.d.ts +11 -4
- package/lib/pc/measure/measure.d.ts.map +1 -1
- package/lib/pc/measure/measure.js +10 -6
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +8 -1
- package/lib/tests/exoTest.d.ts.map +1 -1
- package/lib/tests/exoTest.js +13 -0
- package/lib/tests/mega.test.d.ts +2 -0
- package/lib/tests/mega.test.d.ts.map +1 -0
- package/lib/tests/mega.test.js +13 -0
- package/lib/tests/megaxl.test.d.ts +2 -0
- package/lib/tests/megaxl.test.d.ts.map +1 -0
- package/lib/tests/megaxl.test.js +10 -0
- package/lib/tests/singleExo.test.d.ts.map +1 -1
- package/lib/tests/singleExo.test.js +2 -2
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +2 -1
- package/package.json +3 -1
|
@@ -7,21 +7,79 @@ import { DistanceUnit } from "../../../pc/units/distanceUnits.js";
|
|
|
7
7
|
import { TimeUnit } from "../../../pc/units/timeUnits.js";
|
|
8
8
|
import { FractionNode } from "../../../tree/nodes/operators/fractionNode.js";
|
|
9
9
|
import { VariableNode } from "../../../tree/nodes/variables/variableNode.js";
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { distance, time } = identifiers;
|
|
12
|
+
const distanceMeasure = new Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]);
|
|
13
|
+
const timeMeasure = new Measure(time.value, 0, timeUnits[time.unitIndex]);
|
|
14
|
+
const instruction = `Soit un objet parcourant $${distanceMeasure.toTex({
|
|
15
|
+
notScientific: true,
|
|
16
|
+
})}$ en $${timeMeasure.toTex({ notScientific: true })}$.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Caculer la vitesse moyenne de cet objet en $${DistanceUnit.m.toTex()} \\cdot ${TimeUnit.s.toTex()}^{-1}$.
|
|
20
|
+
`;
|
|
21
|
+
return instruction;
|
|
22
|
+
};
|
|
23
|
+
const getAnswer = (identifiers) => {
|
|
24
|
+
const { distance, time } = identifiers;
|
|
25
|
+
const distanceMeasure = new Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]);
|
|
26
|
+
const timeMeasure = new Measure(time.value, 0, timeUnits[time.unitIndex]);
|
|
27
|
+
const answer = distanceMeasure
|
|
28
|
+
.convert("m")
|
|
29
|
+
.divide(timeMeasure.convert("s"))
|
|
30
|
+
.toSignificant(2);
|
|
31
|
+
return answer.toTex();
|
|
32
|
+
};
|
|
33
|
+
const getHint = (identifiers) => {
|
|
34
|
+
return `La vitesse moyenne est donnée par :
|
|
35
|
+
|
|
36
|
+
$$
|
|
37
|
+
\\frac{\\text{distance}}{\\text{temps}} \\ \\textrm{m} \\cdot \\textrm{s}^{-1}
|
|
38
|
+
$$`;
|
|
39
|
+
};
|
|
40
|
+
const getCorrection = (identifiers) => {
|
|
41
|
+
const { distance, time } = identifiers;
|
|
42
|
+
let correction = ``;
|
|
43
|
+
let step = 1;
|
|
44
|
+
const distanceMeasure = new Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]).convert("m");
|
|
45
|
+
const timeMeasure = new Measure(time.value, 0, timeUnits[time.unitIndex]).convert("s");
|
|
46
|
+
const calcul = new FractionNode(new VariableNode(distanceMeasure.toSignificant(2).toTex()), new VariableNode(timeMeasure.toSignificant(2).toTex()));
|
|
47
|
+
const answer = distanceMeasure.divide(timeMeasure).toSignificant(2).toTex();
|
|
48
|
+
if (distance.unitIndex === 0)
|
|
49
|
+
correction = `- On convertit les $\\textrm{km}$ en $\\textrm{m}$ : $1\\ \\textrm{km}=1000\\ \\textrm{m}$.`;
|
|
50
|
+
switch (time.unitIndex) {
|
|
51
|
+
case 0:
|
|
52
|
+
correction = `${correction}
|
|
53
|
+
- On convertit les heures en secondes : $1\\ \\textrm{h} = 3600\\ \\textrm{s}$.`;
|
|
54
|
+
break;
|
|
55
|
+
case 1:
|
|
56
|
+
default:
|
|
57
|
+
correction = `${correction}
|
|
58
|
+
- On convertit les minutes en secondes : $1\\ \\textrm{m} = 60\\ \\textrm{s}$.`;
|
|
59
|
+
}
|
|
60
|
+
return `${correction}
|
|
61
|
+
- On applique la règle de calcul pour la vitesse moyenne : $${calcul.toTex()} = ${answer}$`;
|
|
62
|
+
};
|
|
63
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
14
64
|
const question = {
|
|
15
|
-
answer:
|
|
16
|
-
instruction:
|
|
65
|
+
answer: getAnswer(identifiers),
|
|
66
|
+
instruction: getInstruction(identifiers),
|
|
17
67
|
keys: [],
|
|
18
|
-
hint:
|
|
19
|
-
correction:
|
|
68
|
+
hint: getHint(identifiers),
|
|
69
|
+
correction: getCorrection(identifiers),
|
|
20
70
|
answerFormat: "tex",
|
|
21
|
-
identifiers
|
|
71
|
+
identifiers,
|
|
22
72
|
};
|
|
23
73
|
return question;
|
|
24
74
|
};
|
|
75
|
+
const timeUnits = [TimeUnit.h, TimeUnit.mi];
|
|
76
|
+
const distanceUnitValues = [DistanceUnit.km, DistanceUnit.m];
|
|
77
|
+
const getAverageSpeedQuestion = () => {
|
|
78
|
+
const distance = { value: randint(70, 151), unitIndex: randint(0, 2) };
|
|
79
|
+
const time = { value: randint(10, 61), unitIndex: randint(0, 2) };
|
|
80
|
+
const identifiers = { distance, time };
|
|
81
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
82
|
+
};
|
|
25
83
|
const getPropositions = (n, { answer, distance, time }) => {
|
|
26
84
|
const propositions = [];
|
|
27
85
|
addValidProp(propositions, answer);
|
|
@@ -59,56 +117,10 @@ const isAnswerValid = (ans, { answer, distance, time }) => {
|
|
|
59
117
|
.toTex({ hideUnit: true }),
|
|
60
118
|
].includes(ans);
|
|
61
119
|
};
|
|
62
|
-
const generateExercise = () => {
|
|
63
|
-
const distance = { value: randint(70, 151), unitIndex: randint(0, 2) };
|
|
64
|
-
const time = { value: randint(10, 61), unitIndex: randint(0, 2) };
|
|
65
|
-
const distanceMeasure = new Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]);
|
|
66
|
-
const timeMeasure = new Measure(time.value, 0, timeUnits[time.unitIndex]);
|
|
67
|
-
const instruction = `Soit un objet parcourant $${distanceMeasure.toTex({
|
|
68
|
-
notScientific: true,
|
|
69
|
-
})}$ en $${timeMeasure.toTex({ notScientific: true })}$. \n \\
|
|
70
|
-
Caculer la vitesse moyenne de cet objet en $${DistanceUnit.m.toTex()} \\cdot ${TimeUnit.s.toTex()}^{-1}$.
|
|
71
|
-
`;
|
|
72
|
-
const answer = distanceMeasure
|
|
73
|
-
.convert("m")
|
|
74
|
-
.divide(timeMeasure.convert("s"))
|
|
75
|
-
.toSignificant(2);
|
|
76
|
-
const correction = getCorrection(distance, time);
|
|
77
|
-
return {
|
|
78
|
-
instruction,
|
|
79
|
-
answer,
|
|
80
|
-
distance,
|
|
81
|
-
time,
|
|
82
|
-
correction,
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
const getCorrection = (distance, time) => {
|
|
86
|
-
let correction = ``;
|
|
87
|
-
let step = 1;
|
|
88
|
-
const distanceMeasure = new Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]).convert("m");
|
|
89
|
-
const timeMeasure = new Measure(time.value, 0, timeUnits[time.unitIndex]).convert("s");
|
|
90
|
-
const calcul = new FractionNode(new VariableNode(distanceMeasure.toSignificant(2).toTex()), new VariableNode(timeMeasure.toSignificant(2).toTex()));
|
|
91
|
-
const answer = distanceMeasure.divide(timeMeasure).toSignificant(2).toTex();
|
|
92
|
-
if (distance.unitIndex === 0)
|
|
93
|
-
correction = `${step++}. Convertir les $km$ en $m$ : $1km=1000m$.`;
|
|
94
|
-
switch (time.unitIndex) {
|
|
95
|
-
case 0:
|
|
96
|
-
correction = `${correction}
|
|
97
|
-
${step++}. Convertir les heures en secondes : $1h = 3600s$.`;
|
|
98
|
-
break;
|
|
99
|
-
case 1:
|
|
100
|
-
correction = `${correction}
|
|
101
|
-
${step++}. Convertir les minutes en secondes : $1m = 60s$.`;
|
|
102
|
-
}
|
|
103
|
-
return `${correction}
|
|
104
|
-
${step}. Appliquer la règle de calcul pour la vitesse moyenne : $${calcul.toTex()} = ${answer}$`;
|
|
105
|
-
};
|
|
106
120
|
export const averageSpeed = {
|
|
107
121
|
id: "averageSpeed",
|
|
108
122
|
label: "Caclul de vitesse moyenne",
|
|
109
|
-
levels: ["2nde"],
|
|
110
123
|
isSingleStep: true,
|
|
111
|
-
sections: ["Mécanique"],
|
|
112
124
|
generator: (nb) => getDistinctQuestions(getAverageSpeedQuestion, nb),
|
|
113
125
|
qcmTimer: 60,
|
|
114
126
|
freeTimer: 60,
|
|
@@ -116,4 +128,5 @@ export const averageSpeed = {
|
|
|
116
128
|
isAnswerValid,
|
|
117
129
|
subject: "Physique",
|
|
118
130
|
hasHintAndCorrection: true,
|
|
131
|
+
getQuestionFromIdentifiers,
|
|
119
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"averageSpeedCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/averageSpeedCalculation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"averageSpeedCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/averageSpeedCalculation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,iBAAiB,GAAG,UAAU,GAAG,OAAO,CAAC;CAClD,CAAC;AA8PF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
|
|
@@ -7,10 +7,8 @@ import { DivideUnit } from "../../../pc/units/divideUnit.js";
|
|
|
7
7
|
import { TimeUnit } from "../../../pc/units/timeUnits.js";
|
|
8
8
|
import { DistanceUnit } from "../../../pc/units/distanceUnits.js";
|
|
9
9
|
import { Measure } from "../../../pc/measure/measure.js";
|
|
10
|
-
const
|
|
11
|
-
const speed
|
|
12
|
-
const distance = round(randfloat(100, 2000), 2); // Distance en km
|
|
13
|
-
const deltaTime = round(distance / speed, 2); // Temps en heures
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { speed, distance, deltaTime, target } = identifiers;
|
|
14
12
|
const variables = [
|
|
15
13
|
{
|
|
16
14
|
name: "vitesse moyenne",
|
|
@@ -28,27 +26,61 @@ const getAverageSpeedQuestion = () => {
|
|
|
28
26
|
symbol: "\\Delta t",
|
|
29
27
|
},
|
|
30
28
|
];
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const knownVariables = variables.filter((_, index) => index !== randomIndex);
|
|
29
|
+
const targetVariable = variables.find((v) => v.name === target);
|
|
30
|
+
const knownVariables = variables.filter((v) => v.name !== target);
|
|
34
31
|
const instruction = `Lors d'une mission d'entraînement, un avion de chasse Rafale a été chronométré et mesuré. Voici les données recueillies :
|
|
35
|
-
|
|
32
|
+
|
|
33
|
+
- ${knownVariables[0].name.charAt(0).toUpperCase() +
|
|
36
34
|
knownVariables[0].name.slice(1)} : $${knownVariables[0].symbol} = ${knownVariables[0].value.toTex({
|
|
37
35
|
notScientific: true,
|
|
38
36
|
})}$
|
|
39
|
-
|
|
37
|
+
- ${knownVariables[1].name.charAt(0).toUpperCase() +
|
|
40
38
|
knownVariables[1].name.slice(1)} : $${knownVariables[1].symbol} = ${knownVariables[1].value.toTex({
|
|
41
39
|
notScientific: true,
|
|
42
|
-
})}$.
|
|
43
|
-
|
|
40
|
+
})}$.
|
|
41
|
+
|
|
42
|
+
Utilisez ces informations pour calculer ${targetVariable.name === "distance" ||
|
|
44
43
|
targetVariable.name === "vitesse moyenne"
|
|
45
44
|
? "la"
|
|
46
45
|
: "le"} ${targetVariable.name} en $${targetVariable.value.getUnit().toTex()}$.`;
|
|
47
|
-
|
|
46
|
+
return instruction;
|
|
47
|
+
};
|
|
48
|
+
const getAnswer = (identifiers) => {
|
|
49
|
+
const { speed, distance, deltaTime, target } = identifiers;
|
|
50
|
+
return getAnswerNode(identifiers).toTex({
|
|
51
|
+
notScientific: true,
|
|
52
|
+
hideUnit: true,
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const getHint = (identifiers) => {
|
|
56
|
+
const { speed, distance, deltaTime, target } = identifiers;
|
|
57
|
+
const hint = target === "vitesse moyenne"
|
|
48
58
|
? `Rappelez-vous la formule de la vitesse moyenne : $v = \\frac{d}{\\Delta t}$.`
|
|
49
|
-
:
|
|
59
|
+
: target === "distance"
|
|
50
60
|
? `Rappelez-vous la formule de la distance : $d = v \\times \\Delta t$.`
|
|
51
61
|
: `Rappelez-vous la formule du temps : $\\Delta t = \\frac{d}{v}$.`;
|
|
62
|
+
return hint;
|
|
63
|
+
};
|
|
64
|
+
const getCorrection = (identifiers) => {
|
|
65
|
+
const { speed, distance, deltaTime, target } = identifiers;
|
|
66
|
+
const variables = [
|
|
67
|
+
{
|
|
68
|
+
name: "vitesse moyenne",
|
|
69
|
+
value: new Measure(speed, 0, new DivideUnit(DistanceUnit.km, TimeUnit.h)),
|
|
70
|
+
symbol: "v",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "distance",
|
|
74
|
+
value: new Measure(distance, 0, DistanceUnit.km),
|
|
75
|
+
symbol: "d",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "temps",
|
|
79
|
+
value: new Measure(deltaTime, 0, TimeUnit.h),
|
|
80
|
+
symbol: "\\Delta t",
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
const targetVariable = variables.find((v) => v.name === target);
|
|
52
84
|
const correction = targetVariable.name === "vitesse moyenne"
|
|
53
85
|
? `La vitesse moyenne est calculée en utilisant la formule $v = \\frac{d}{\\Delta t}$. Donc, $v = \\frac{${round(distance, 2)
|
|
54
86
|
.toTree()
|
|
@@ -62,25 +94,63 @@ const getAverageSpeedQuestion = () => {
|
|
|
62
94
|
: `Le temps est calculé en utilisant la formule $\\Delta t = \\frac{d}{v}$. Donc, $t = \\frac{${round(distance, 2)
|
|
63
95
|
.toTree()
|
|
64
96
|
.toTex()}}{${round(speed, 2).toTree().toTex()}} = ${new Measure(round(distance / speed, 2), 0, TimeUnit.h).toTex({ notScientific: true })}$.`;
|
|
97
|
+
return correction;
|
|
98
|
+
};
|
|
99
|
+
const getAnswerNode = (identifiers) => {
|
|
100
|
+
const { speed, distance, deltaTime, target } = identifiers;
|
|
101
|
+
switch (target) {
|
|
102
|
+
case "distance":
|
|
103
|
+
return new Measure(round(speed * deltaTime, 2), 0, DistanceUnit.km);
|
|
104
|
+
case "vitesse moyenne":
|
|
105
|
+
return new Measure(round(distance / deltaTime, 2), 0, new DivideUnit(DistanceUnit.km, TimeUnit.h));
|
|
106
|
+
case "temps":
|
|
107
|
+
return new Measure(round(distance / speed, 2), 0, TimeUnit.h);
|
|
108
|
+
}
|
|
109
|
+
return new Measure(0);
|
|
110
|
+
};
|
|
111
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
65
112
|
const question = {
|
|
66
|
-
answer:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
instruction,
|
|
71
|
-
hint,
|
|
72
|
-
correction,
|
|
113
|
+
answer: getAnswer(identifiers),
|
|
114
|
+
instruction: getInstruction(identifiers),
|
|
115
|
+
hint: getHint(identifiers),
|
|
116
|
+
correction: getCorrection(identifiers),
|
|
73
117
|
keys: [],
|
|
74
118
|
answerFormat: "tex",
|
|
75
|
-
identifiers
|
|
76
|
-
speed,
|
|
77
|
-
distance,
|
|
78
|
-
deltaTime,
|
|
79
|
-
target: targetVariable.name,
|
|
80
|
-
},
|
|
119
|
+
identifiers,
|
|
81
120
|
};
|
|
82
121
|
return question;
|
|
83
122
|
};
|
|
123
|
+
const getAverageSpeedQuestion = () => {
|
|
124
|
+
const speed = round(randfloat(900, 1400), 2); // Vitesse en km/h
|
|
125
|
+
const distance = round(randfloat(100, 2000), 2); // Distance en km
|
|
126
|
+
const deltaTime = round(distance / speed, 2); // Temps en heures
|
|
127
|
+
const variables = [
|
|
128
|
+
{
|
|
129
|
+
name: "vitesse moyenne",
|
|
130
|
+
value: new Measure(speed, 0, new DivideUnit(DistanceUnit.km, TimeUnit.h)),
|
|
131
|
+
symbol: "v",
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "distance",
|
|
135
|
+
value: new Measure(distance, 0, DistanceUnit.km),
|
|
136
|
+
symbol: "d",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "temps",
|
|
140
|
+
value: new Measure(deltaTime, 0, TimeUnit.h),
|
|
141
|
+
symbol: "\\Delta t",
|
|
142
|
+
},
|
|
143
|
+
];
|
|
144
|
+
const randomIndex = randint(0, variables.length);
|
|
145
|
+
const targetVariable = variables[randomIndex];
|
|
146
|
+
const identifiers = {
|
|
147
|
+
speed,
|
|
148
|
+
distance,
|
|
149
|
+
deltaTime,
|
|
150
|
+
target: targetVariable.name,
|
|
151
|
+
};
|
|
152
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
153
|
+
};
|
|
84
154
|
const getPropositions = (n, { answer, speed, distance, deltaTime, target }) => {
|
|
85
155
|
const propositions = [];
|
|
86
156
|
addValidProp(propositions, answer, "tex");
|
|
@@ -116,23 +186,10 @@ const getPropositions = (n, { answer, speed, distance, deltaTime, target }) => {
|
|
|
116
186
|
const isAnswerValid = (ans, { answer }) => {
|
|
117
187
|
return ans === answer;
|
|
118
188
|
};
|
|
119
|
-
const getCorrectAns = (targetVariable, speed, distance, deltaTime) => {
|
|
120
|
-
switch (targetVariable) {
|
|
121
|
-
case "distance":
|
|
122
|
-
return new Measure(round(speed * deltaTime, 2), 0, DistanceUnit.km);
|
|
123
|
-
case "vitesse moyenne":
|
|
124
|
-
return new Measure(round(distance / deltaTime, 2), 0, new DivideUnit(DistanceUnit.km, TimeUnit.h));
|
|
125
|
-
case "temps":
|
|
126
|
-
return new Measure(round(distance / speed, 2), 0, TimeUnit.h);
|
|
127
|
-
}
|
|
128
|
-
return new Measure(0);
|
|
129
|
-
};
|
|
130
189
|
export const AverageSpeedCalculationExercise = {
|
|
131
190
|
id: "averageSpeedCalculation",
|
|
132
191
|
label: "Calculer la vitesse moyenne, la distance ou le temps d'un objet en mouvement",
|
|
133
|
-
levels: ["2nde"],
|
|
134
192
|
isSingleStep: true,
|
|
135
|
-
sections: ["Mécanique"],
|
|
136
193
|
generator: (nb) => getDistinctQuestions(getAverageSpeedQuestion, nb),
|
|
137
194
|
qcmTimer: 60,
|
|
138
195
|
freeTimer: 60,
|
|
@@ -140,4 +197,5 @@ export const AverageSpeedCalculationExercise = {
|
|
|
140
197
|
isAnswerValid,
|
|
141
198
|
subject: "Physique",
|
|
142
199
|
hasHintAndCorrection: true,
|
|
200
|
+
getQuestionFromIdentifiers,
|
|
143
201
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Exercise } from "../../../exercises/exercise.js";
|
|
2
2
|
type Identifiers = {
|
|
3
|
-
|
|
3
|
+
delta: number;
|
|
4
|
+
constant: number;
|
|
5
|
+
step: number;
|
|
6
|
+
speedVectorX1: number;
|
|
4
7
|
};
|
|
5
8
|
export declare const characteristicsOfVelocityVector: Exercise<Identifiers>;
|
|
6
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characteristicsOfVelocityVector.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/characteristicsOfVelocityVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"characteristicsOfVelocityVector.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/characteristicsOfVelocityVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAwFF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
|
|
@@ -3,22 +3,64 @@ import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuesti
|
|
|
3
3
|
import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
|
|
4
4
|
import { randfloat } from "../../../math/utils/random/randfloat.js";
|
|
5
5
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
6
|
+
import { round } from "../../../math/utils/round.js";
|
|
6
7
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
7
|
-
const
|
|
8
|
-
const
|
|
8
|
+
const getInstruction = (identifiers) => {
|
|
9
|
+
const { delta } = identifiers;
|
|
10
|
+
const instruction = `Un objet en mouvement rectiligne uniforme est suivi par une chronographie.
|
|
11
|
+
|
|
12
|
+
Les points marqués par la chronographie sur la bande de papier sont espacés uniformément en temps, avec un intervalle de $${delta}$ seconde entre chaque point.
|
|
13
|
+
|
|
14
|
+
Calculer la norme du vecteur vitesse $\\overrightarrow{M}$.
|
|
15
|
+
`;
|
|
16
|
+
return instruction;
|
|
17
|
+
};
|
|
18
|
+
const getAnswer = (identifiers) => {
|
|
19
|
+
const { step, delta } = identifiers;
|
|
20
|
+
return round(step / delta, 2).frenchify();
|
|
21
|
+
};
|
|
22
|
+
const getGGBOptions = (identifiers) => {
|
|
23
|
+
const { delta, constant, step, speedVectorX1 } = identifiers;
|
|
24
|
+
const commands = [];
|
|
25
|
+
for (let x = 0; x < 4 * step; x += step) {
|
|
26
|
+
commands.push(`Point({${x},${constant}})`);
|
|
27
|
+
}
|
|
28
|
+
commands.push(` M = Vector((${speedVectorX1},${constant}),(${speedVectorX1 + step},${constant}))`, `Text("$\\overrightarrow{\\mathit{M}}$",(${speedVectorX1},${constant + 2}),false,true)`);
|
|
29
|
+
const ggb = new GeogebraConstructor({ commands });
|
|
30
|
+
return ggb.getOptions({ coords: [-1, Math.max(step * 5, 20), -2, 10] });
|
|
31
|
+
};
|
|
32
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
9
33
|
const question = {
|
|
10
|
-
answer:
|
|
11
|
-
instruction:
|
|
34
|
+
answer: getAnswer(identifiers),
|
|
35
|
+
instruction: getInstruction(identifiers),
|
|
12
36
|
keys: [],
|
|
13
|
-
ggbOptions:
|
|
37
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
14
38
|
answerFormat: "tex",
|
|
15
|
-
identifiers
|
|
39
|
+
identifiers,
|
|
16
40
|
};
|
|
17
41
|
return question;
|
|
18
42
|
};
|
|
19
|
-
const
|
|
43
|
+
const getCharacteristicsOfVelocityVectorQuestion = () => {
|
|
44
|
+
const delta = randint(2, 11);
|
|
45
|
+
const constant = randint(3, 8);
|
|
46
|
+
const step = randint(3, 8);
|
|
47
|
+
let speedVectorX1 = null;
|
|
48
|
+
for (let x = 0; x < 4 * step; x += step) {
|
|
49
|
+
if ((speedVectorX1 === null && coinFlip()) || x === 2 * step)
|
|
50
|
+
speedVectorX1 = x;
|
|
51
|
+
}
|
|
52
|
+
const identifiers = {
|
|
53
|
+
delta,
|
|
54
|
+
constant,
|
|
55
|
+
step,
|
|
56
|
+
speedVectorX1: speedVectorX1,
|
|
57
|
+
};
|
|
58
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
59
|
+
};
|
|
60
|
+
const getPropositions = (n, { answer, delta, step }) => {
|
|
20
61
|
const propositions = [];
|
|
21
62
|
addValidProp(propositions, answer);
|
|
63
|
+
const norm = round(step / delta, 2);
|
|
22
64
|
while (propositions.length < n) {
|
|
23
65
|
let random = randfloat(norm - 3, norm + 4, 2, [norm]);
|
|
24
66
|
tryToAddWrongProp(propositions, random.frenchify());
|
|
@@ -28,51 +70,10 @@ const getPropositions = (n, { answer, norm }) => {
|
|
|
28
70
|
const isAnswerValid = (ans, { answer }) => {
|
|
29
71
|
return ans === answer;
|
|
30
72
|
};
|
|
31
|
-
const generateExercise = () => {
|
|
32
|
-
const delta = randint(2, 11);
|
|
33
|
-
const ggb = getGgb(delta);
|
|
34
|
-
const instruction = `
|
|
35
|
-
Un objet en mouvement rectiligne uniforme est suivi par une chronographie. \n \\
|
|
36
|
-
Les points marqués par la chronographie sur la bande de papier sont espacés uniformément en temps, avec un intervalle de $${delta}$ seconde entre chaque point. \n \\
|
|
37
|
-
Calculer la norme du vecteur vitesse $\\overrightarrow{M}$
|
|
38
|
-
`;
|
|
39
|
-
const answer = ggb.speedVector.norm;
|
|
40
|
-
return {
|
|
41
|
-
instruction,
|
|
42
|
-
ggb: new GeogebraConstructor({ commands: ggb.commands }),
|
|
43
|
-
ggbCoords: ggb.coords,
|
|
44
|
-
answer,
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
const getGgb = (delta) => {
|
|
48
|
-
const commands = [];
|
|
49
|
-
const constant = randint(3, 8);
|
|
50
|
-
const step = randint(3, 8);
|
|
51
|
-
let speedVector = null;
|
|
52
|
-
for (let x = 0; x < 4 * step; x += step) {
|
|
53
|
-
if ((speedVector === null && coinFlip()) || x === 2 * step)
|
|
54
|
-
speedVector = {
|
|
55
|
-
x1: x,
|
|
56
|
-
y1: constant,
|
|
57
|
-
x2: x + step,
|
|
58
|
-
y2: constant,
|
|
59
|
-
norm: +(step / delta).toFixed(2),
|
|
60
|
-
};
|
|
61
|
-
commands.push(`Point({${x},${constant}})`);
|
|
62
|
-
}
|
|
63
|
-
commands.push(` M = Vector((${speedVector.x1},${speedVector.y1}),(${speedVector.x2},${speedVector.y2}))`, `Text("$\\overrightarrow{\\mathit{M}}$",(${speedVector.x1},${speedVector.y1 + 2}),false,true)`);
|
|
64
|
-
return {
|
|
65
|
-
commands,
|
|
66
|
-
speedVector,
|
|
67
|
-
coords: [-1, Math.max(step * 5, 20), -2, 10],
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
73
|
export const characteristicsOfVelocityVector = {
|
|
71
74
|
id: "characteristicsOfVelocityVector",
|
|
72
|
-
label: "
|
|
73
|
-
levels: ["2nde"],
|
|
75
|
+
label: "Calculer la norme d'un vecteur vitesse",
|
|
74
76
|
isSingleStep: true,
|
|
75
|
-
sections: ["Mécanique"],
|
|
76
77
|
generator: (nb) => getDistinctQuestions(getCharacteristicsOfVelocityVectorQuestion, nb),
|
|
77
78
|
qcmTimer: 60,
|
|
78
79
|
freeTimer: 60,
|
|
@@ -80,4 +81,5 @@ export const characteristicsOfVelocityVector = {
|
|
|
80
81
|
isAnswerValid,
|
|
81
82
|
subject: "Physique",
|
|
82
83
|
hasGeogebra: true,
|
|
84
|
+
getQuestionFromIdentifiers,
|
|
83
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motionReference.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/motionReference.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"motionReference.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/motionReference.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,GAAG,QAAQ,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AA0NF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
|
|
@@ -100,42 +100,64 @@ const determineCorrectAnswer = (situation, reference) => {
|
|
|
100
100
|
}
|
|
101
101
|
return "On ne peut pas savoir";
|
|
102
102
|
};
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
const situation = situations
|
|
106
|
-
const
|
|
107
|
-
const reference = references[referenceIndex];
|
|
108
|
-
const objectToCheckIndex = coinFlip();
|
|
109
|
-
const objectToCheck = objectToCheckIndex
|
|
110
|
-
? situation.object1
|
|
111
|
-
: situation.object2;
|
|
103
|
+
const getInstruction = (identifiers) => {
|
|
104
|
+
const { object1, object2, reference, isAskingObject1 } = identifiers;
|
|
105
|
+
const situation = situations.find((s) => s.object1 === object1 && s.object2 === object2);
|
|
106
|
+
const objectToCheck = isAskingObject1 ? situation.object1 : situation.object2;
|
|
112
107
|
const otherObject = situation.object1 === objectToCheck ? situation.object2 : situation.object1;
|
|
113
|
-
const
|
|
114
|
-
const isMasculine = objectToCheckIndex
|
|
108
|
+
const isMasculine = isAskingObject1
|
|
115
109
|
? situation.gender1 === "masculin"
|
|
116
110
|
: situation.gender2 === "masculin";
|
|
117
111
|
const genderPronoun = isMasculine ? "il" : "elle";
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
112
|
+
const referenceText = reference === "à l'autre" ? otherObject : "sol";
|
|
113
|
+
const instruction = `${situation.context}
|
|
114
|
+
|
|
115
|
+
${requiresApostropheBefore(objectToCheck) ? "L'" : "Le "}${objectToCheck} est-${genderPronoun} en mouvement par rapport ${requiresApostropheBefore(referenceText) ? "à l'" : "au "}${referenceText} ?`;
|
|
116
|
+
return instruction;
|
|
117
|
+
};
|
|
118
|
+
const getAnswer = (identifiers) => {
|
|
119
|
+
const { object1, object2, reference } = identifiers;
|
|
120
|
+
const situation = situations.find((s) => s.object1 === object1 && s.object2 === object2);
|
|
121
|
+
return determineCorrectAnswer(situation, reference);
|
|
122
|
+
};
|
|
123
|
+
const getHint = (identifiers) => {
|
|
124
|
+
const { object1, object2, reference } = identifiers;
|
|
125
|
+
const situation = situations.find((s) => s.object1 === object1 && s.object2 === object2);
|
|
122
126
|
const hint = situation.hints[reference];
|
|
127
|
+
return hint;
|
|
128
|
+
};
|
|
129
|
+
const getCorrection = (identifiers) => {
|
|
130
|
+
const { object1, object2, reference } = identifiers;
|
|
131
|
+
const situation = situations.find((s) => s.object1 === object1 && s.object2 === object2);
|
|
123
132
|
const correction = situation.corrections[reference];
|
|
133
|
+
return correction;
|
|
134
|
+
};
|
|
135
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
124
136
|
const question = {
|
|
125
|
-
answer:
|
|
126
|
-
instruction,
|
|
127
|
-
hint,
|
|
128
|
-
correction,
|
|
137
|
+
answer: getAnswer(identifiers),
|
|
138
|
+
instruction: getInstruction(identifiers),
|
|
139
|
+
hint: getHint(identifiers),
|
|
140
|
+
correction: getCorrection(identifiers),
|
|
129
141
|
keys: [],
|
|
130
142
|
answerFormat: "raw",
|
|
131
|
-
identifiers
|
|
132
|
-
object1: situation.object1,
|
|
133
|
-
object2: situation.object2,
|
|
134
|
-
reference,
|
|
135
|
-
},
|
|
143
|
+
identifiers,
|
|
136
144
|
};
|
|
137
145
|
return question;
|
|
138
146
|
};
|
|
147
|
+
const getMotionReferenceQuestion = () => {
|
|
148
|
+
const situationIndex = randint(0, situations.length);
|
|
149
|
+
const situation = situations[situationIndex];
|
|
150
|
+
const referenceIndex = randint(0, references.length);
|
|
151
|
+
const reference = references[referenceIndex];
|
|
152
|
+
const isAskingObject1 = coinFlip();
|
|
153
|
+
const identifiers = {
|
|
154
|
+
object1: situation.object1,
|
|
155
|
+
object2: situation.object2,
|
|
156
|
+
reference,
|
|
157
|
+
isAskingObject1,
|
|
158
|
+
};
|
|
159
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
160
|
+
};
|
|
139
161
|
const getPropositions = (n, { answer }) => {
|
|
140
162
|
const propositions = [];
|
|
141
163
|
addValidProp(propositions, answer, "raw");
|
|
@@ -150,9 +172,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
150
172
|
export const MotionReferenceExercise = {
|
|
151
173
|
id: "motionReference",
|
|
152
174
|
label: "Déterminer le mouvement relatif entre deux objets",
|
|
153
|
-
levels: ["2nde"],
|
|
154
175
|
isSingleStep: true,
|
|
155
|
-
sections: ["Mécanique"],
|
|
156
176
|
answerType: "QCU",
|
|
157
177
|
generator: (nb) => getDistinctQuestions(getMotionReferenceQuestion, nb, 10),
|
|
158
178
|
qcmTimer: 60,
|
|
@@ -162,4 +182,5 @@ export const MotionReferenceExercise = {
|
|
|
162
182
|
subject: "Physique",
|
|
163
183
|
maxAllowedQuestions: 10,
|
|
164
184
|
hasHintAndCorrection: true,
|
|
185
|
+
getQuestionFromIdentifiers,
|
|
165
186
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CAEd,CAAC;AA2FF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
|