math-exercises 3.0.69 → 3.0.71
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/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/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/exponential/expFactorization.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expFactorization.js +1 -0
- 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/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/summitReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitReading.js +1 -2
- 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/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/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/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/efficiencyCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/energy/efficiencyCalculation.js +5 -3
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +0 -1
- 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 -16
- 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 +58 -37
- 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
|
@@ -1,23 +1,44 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
+
import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
4
5
|
import { AddNode } from "../../../../tree/nodes/operators/addNode.js";
|
|
5
6
|
import { DivideNode } from "../../../../tree/nodes/operators/divideNode.js";
|
|
6
7
|
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
8
|
import { SubstractNode } from "../../../../tree/nodes/operators/substractNode.js";
|
|
8
9
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const statement = reifyAlgebraic(identifiers.nodeIds);
|
|
12
|
+
return `Calculer :
|
|
13
|
+
|
|
14
|
+
$$
|
|
15
|
+
${statement.toTex()}
|
|
16
|
+
$$`;
|
|
17
|
+
};
|
|
18
|
+
const getAnswer = (identifiers) => {
|
|
19
|
+
const statement = reifyAlgebraic(identifiers.nodeIds);
|
|
20
|
+
return statement.simplify().toTex();
|
|
21
|
+
};
|
|
22
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
23
|
+
const question = {
|
|
24
|
+
answer: getAnswer(identifiers),
|
|
25
|
+
instruction: getInstruction(identifiers),
|
|
26
|
+
keys: [],
|
|
27
|
+
answerFormat: "tex",
|
|
28
|
+
identifiers,
|
|
29
|
+
};
|
|
30
|
+
return question;
|
|
31
|
+
};
|
|
9
32
|
const getOperationsPrioritiesParenthesisNoRelativesQuestion = () => {
|
|
10
33
|
const type = randint(1, 5);
|
|
11
34
|
let a, b, c, d;
|
|
12
35
|
let statement;
|
|
13
|
-
let answer = "";
|
|
14
36
|
switch (type) {
|
|
15
37
|
case 1: //a*(b+-c)
|
|
16
38
|
a = randint(2, 11);
|
|
17
39
|
b = randint(1, 11);
|
|
18
40
|
c = randint(-b, 11, [0]);
|
|
19
41
|
statement = new MultiplyNode(a.toTree(), new AddNode(b.toTree(), c.toTree())).shuffle();
|
|
20
|
-
answer = (a * (b + c)).frenchify();
|
|
21
42
|
break;
|
|
22
43
|
case 2: //a/(b+-c) ou (b+-c)/a
|
|
23
44
|
if (coinFlip()) {
|
|
@@ -26,7 +47,6 @@ const getOperationsPrioritiesParenthesisNoRelativesQuestion = () => {
|
|
|
26
47
|
c = randint(-b + 1, 11);
|
|
27
48
|
a = (b + c) * randint(2, 10);
|
|
28
49
|
statement = new DivideNode(a.toTree(), new AddNode(b.toTree(), c.toTree()));
|
|
29
|
-
answer = (a / (b + c)).frenchify();
|
|
30
50
|
}
|
|
31
51
|
else {
|
|
32
52
|
//(b+-c)/a
|
|
@@ -35,7 +55,6 @@ const getOperationsPrioritiesParenthesisNoRelativesQuestion = () => {
|
|
|
35
55
|
b = Math.max(k - randint(-10, 11, [0]), 1);
|
|
36
56
|
c = k - b;
|
|
37
57
|
statement = new DivideNode(new AddNode(b.toTree(), c.toTree()), a.toTree());
|
|
38
|
-
answer = ((b + c) / a).frenchify();
|
|
39
58
|
}
|
|
40
59
|
break;
|
|
41
60
|
case 3: // (a+-b)*/(c+-d)
|
|
@@ -45,7 +64,6 @@ const getOperationsPrioritiesParenthesisNoRelativesQuestion = () => {
|
|
|
45
64
|
b = randint(-a, 11, [0]);
|
|
46
65
|
d = randint(-c, 11, [0]);
|
|
47
66
|
statement = new MultiplyNode(new AddNode(a.toTree(), b.toTree()), new AddNode(c.toTree(), d.toTree()));
|
|
48
|
-
answer = ((a + b) * (c + d)).frenchify();
|
|
49
67
|
}
|
|
50
68
|
else {
|
|
51
69
|
//(a+-b)/(c+-d)
|
|
@@ -55,7 +73,6 @@ const getOperationsPrioritiesParenthesisNoRelativesQuestion = () => {
|
|
|
55
73
|
a = Math.max(k - randint(-10, 11, [0]), 1);
|
|
56
74
|
b = k - a;
|
|
57
75
|
statement = new DivideNode(new AddNode(a.toTree(), b.toTree()), new AddNode(c.toTree(), d.toTree()));
|
|
58
|
-
answer = ((a + b) / (c + d)).frenchify();
|
|
59
76
|
}
|
|
60
77
|
break;
|
|
61
78
|
case 4: // a +- (b+- c/*d)
|
|
@@ -84,17 +101,10 @@ const getOperationsPrioritiesParenthesisNoRelativesQuestion = () => {
|
|
|
84
101
|
a = randint(secondValue + 1, secondValue + 10);
|
|
85
102
|
}
|
|
86
103
|
statement = new (isAdd ? AddNode : SubstractNode)(a.toTree(), new (isAdd2 ? AddNode : SubstractNode)(b.toTree(), new (isDivide ? DivideNode : MultiplyNode)(c.toTree(), d.toTree()), { forceParenthesis: isAdd }));
|
|
87
|
-
answer = statement.evaluate({}).toString();
|
|
88
104
|
break;
|
|
89
105
|
}
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
instruction: `Calculer : $${statement.toTex()}$`,
|
|
93
|
-
keys: [],
|
|
94
|
-
answerFormat: "tex",
|
|
95
|
-
identifiers: { nodeIds: statement.toIdentifiers(), type },
|
|
96
|
-
};
|
|
97
|
-
return question;
|
|
106
|
+
const identifiers = { nodeIds: statement.toIdentifiers(), type };
|
|
107
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
98
108
|
};
|
|
99
109
|
const getPropositions = (n, { answer }) => {
|
|
100
110
|
const propositions = [];
|
|
@@ -111,13 +121,12 @@ export const operationsPrioritiesParenthesisNoRelatives = {
|
|
|
111
121
|
id: "operationsPrioritiesParenthesisNoRelatives",
|
|
112
122
|
connector: "=",
|
|
113
123
|
label: "Priorités opératoires avec parenthèses (sans relatifs)",
|
|
114
|
-
levels: [],
|
|
115
124
|
isSingleStep: true,
|
|
116
|
-
sections: [],
|
|
117
125
|
generator: (nb) => getDistinctQuestions(getOperationsPrioritiesParenthesisNoRelativesQuestion, nb),
|
|
118
126
|
qcmTimer: 60,
|
|
119
127
|
freeTimer: 60,
|
|
120
128
|
getPropositions,
|
|
121
129
|
isAnswerValid,
|
|
122
130
|
subject: "Mathématiques",
|
|
131
|
+
getQuestionFromIdentifiers,
|
|
123
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operationsPrioritiesWithoutRelative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"operationsPrioritiesWithoutRelative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAySF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAarE,CAAC"}
|
|
@@ -14,13 +14,93 @@ import { DivideNode } from "../../../../tree/nodes/operators/divideNode.js";
|
|
|
14
14
|
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
15
15
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
16
16
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
17
|
+
const getInstruction = (identifiers) => {
|
|
18
|
+
return `Calculer :
|
|
19
|
+
|
|
20
|
+
$$
|
|
21
|
+
${getStartStatement(identifiers)}
|
|
22
|
+
$$`;
|
|
23
|
+
};
|
|
24
|
+
const getAnswer = (identifiers) => {
|
|
25
|
+
return getStatementNode(identifiers).simplify().toTex();
|
|
26
|
+
};
|
|
27
|
+
const getStatementNode = (identifiers) => {
|
|
28
|
+
const { type, flip, a, b, c, d, subFlip } = identifiers;
|
|
29
|
+
switch (type) {
|
|
30
|
+
case 1: // a*b ± c±d
|
|
31
|
+
switch (flip) {
|
|
32
|
+
case 1:
|
|
33
|
+
//a*b first
|
|
34
|
+
return new AddNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new AddNode(new NumberNode(c), new NumberNode(d)));
|
|
35
|
+
case 2:
|
|
36
|
+
//a*b last
|
|
37
|
+
return new AddNode(new AddNode(new NumberNode(c), new NumberNode(d)), new MultiplyNode(new NumberNode(a), new NumberNode(b)));
|
|
38
|
+
case 3:
|
|
39
|
+
default:
|
|
40
|
+
//a*b middle
|
|
41
|
+
return new AddNode(new AddNode(new NumberNode(c), new MultiplyNode(new NumberNode(a), new NumberNode(b))), new NumberNode(d));
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
case 2: // a/b ±c±d
|
|
45
|
+
switch (flip) {
|
|
46
|
+
case 1:
|
|
47
|
+
//a/b first
|
|
48
|
+
return new AddNode(new DivideNode(new NumberNode(a), new NumberNode(b)), new AddNode(new NumberNode(c), new NumberNode(d)));
|
|
49
|
+
case 2:
|
|
50
|
+
//a/b last
|
|
51
|
+
return new AddNode(new AddNode(new NumberNode(c), new NumberNode(d)), new DivideNode(new NumberNode(a), new NumberNode(b)));
|
|
52
|
+
case 3:
|
|
53
|
+
default:
|
|
54
|
+
//a/b middle
|
|
55
|
+
return new AddNode(new AddNode(new NumberNode(c), new DivideNode(new NumberNode(a), new NumberNode(b))), new NumberNode(d));
|
|
56
|
+
}
|
|
57
|
+
break;
|
|
58
|
+
case 3: // a*b ± c*d
|
|
59
|
+
return new AddNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new MultiplyNode(new NumberNode(c), new NumberNode(d)));
|
|
60
|
+
case 4: // a*b ± c/d
|
|
61
|
+
if (subFlip) {
|
|
62
|
+
return new AddNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new DivideNode(new NumberNode(c), new NumberNode(d)));
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return new AddNode(new DivideNode(new NumberNode(c), new NumberNode(d)), new MultiplyNode(new NumberNode(a), new NumberNode(b)));
|
|
66
|
+
}
|
|
67
|
+
break;
|
|
68
|
+
case 5: // a/b ± c/d
|
|
69
|
+
return new AddNode(new DivideNode(new NumberNode(a), new NumberNode(b)), new DivideNode(new NumberNode(c), new NumberNode(d)));
|
|
70
|
+
case 6: // a*b*c ± d
|
|
71
|
+
if (subFlip) {
|
|
72
|
+
return new AddNode(new MultiplyNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new NumberNode(c)), new NumberNode(d));
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
return new AddNode(new MultiplyNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new NumberNode(c)), new NumberNode(d));
|
|
76
|
+
}
|
|
77
|
+
case 7: //a/b*c et c*a/b
|
|
78
|
+
return new MultiplyNode(new DivideNode(a.toTree(), b.toTree()), c.toTree()).shuffle();
|
|
79
|
+
case 8: //a+-b+-c
|
|
80
|
+
default:
|
|
81
|
+
return new AddNode(new AddNode(a.toTree(), b.toTree()), c.toTree());
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const getStartStatement = (identifiers) => {
|
|
85
|
+
const { type, flip, a, b, c, d } = identifiers;
|
|
86
|
+
return getStatementNode(identifiers).toTex();
|
|
87
|
+
};
|
|
88
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
89
|
+
const question = {
|
|
90
|
+
instruction: getInstruction(identifiers),
|
|
91
|
+
startStatement: getStartStatement(identifiers),
|
|
92
|
+
answer: getAnswer(identifiers),
|
|
93
|
+
keys: [],
|
|
94
|
+
answerFormat: "tex",
|
|
95
|
+
identifiers,
|
|
96
|
+
};
|
|
97
|
+
return question;
|
|
98
|
+
};
|
|
17
99
|
const getOperationsPrioritiesWithoutRelative = () => {
|
|
18
100
|
const type = randint(1, 9);
|
|
19
101
|
const flip = randint(1, 4);
|
|
20
|
-
let startStatement = "";
|
|
21
|
-
let answer = "";
|
|
22
102
|
let a = 1, b = 1, c = 1, d = 1;
|
|
23
|
-
|
|
103
|
+
const subFlip = coinFlip();
|
|
24
104
|
switch (type) {
|
|
25
105
|
case 1: // a*b ± c±d
|
|
26
106
|
switch (flip) {
|
|
@@ -29,9 +109,6 @@ const getOperationsPrioritiesWithoutRelative = () => {
|
|
|
29
109
|
[a, b] = [1, 2].map((el) => randint(0, 11));
|
|
30
110
|
c = randint(-(a * b), 11, [0]);
|
|
31
111
|
d = randint(-(a * b + c), 11, [0]);
|
|
32
|
-
statement = new AddNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new AddNode(new NumberNode(c), new NumberNode(d)));
|
|
33
|
-
startStatement = statement.toTex();
|
|
34
|
-
answer = (a * b + c + d).toString();
|
|
35
112
|
break;
|
|
36
113
|
case 2:
|
|
37
114
|
//a*b last
|
|
@@ -41,9 +118,6 @@ const getOperationsPrioritiesWithoutRelative = () => {
|
|
|
41
118
|
a = randint(-10, 11);
|
|
42
119
|
b = randint(0, 11);
|
|
43
120
|
} while (c + d + a * b < 0);
|
|
44
|
-
statement = new AddNode(new AddNode(new NumberNode(c), new NumberNode(d)), new MultiplyNode(new NumberNode(a), new NumberNode(b)));
|
|
45
|
-
startStatement = statement.toTex();
|
|
46
|
-
answer = (a * b + c + d).toString();
|
|
47
121
|
break;
|
|
48
122
|
case 3:
|
|
49
123
|
//a*b middle
|
|
@@ -53,9 +127,6 @@ const getOperationsPrioritiesWithoutRelative = () => {
|
|
|
53
127
|
b = randint(0, 11);
|
|
54
128
|
} while (c + a * b < 0);
|
|
55
129
|
d = randint(-(c + a * b), 11, [0]);
|
|
56
|
-
statement = new AddNode(new AddNode(new NumberNode(c), new MultiplyNode(new NumberNode(a), new NumberNode(b))), new NumberNode(d));
|
|
57
|
-
startStatement = statement.toTex();
|
|
58
|
-
answer = (a * b + c + d).toString();
|
|
59
130
|
break;
|
|
60
131
|
}
|
|
61
132
|
break;
|
|
@@ -67,9 +138,6 @@ const getOperationsPrioritiesWithoutRelative = () => {
|
|
|
67
138
|
a = b * randint(0, 11);
|
|
68
139
|
c = randint(-(a / b), 11, [0]);
|
|
69
140
|
d = randint(-(a / b + c), 11, [0]);
|
|
70
|
-
statement = new AddNode(new DivideNode(new NumberNode(a), new NumberNode(b)), new AddNode(new NumberNode(c), new NumberNode(d)));
|
|
71
|
-
startStatement = statement.toTex();
|
|
72
|
-
answer = (a / b + c + d).toString();
|
|
73
141
|
break;
|
|
74
142
|
case 2:
|
|
75
143
|
//a/b last
|
|
@@ -79,9 +147,6 @@ const getOperationsPrioritiesWithoutRelative = () => {
|
|
|
79
147
|
b = randint(1, 11);
|
|
80
148
|
a = b * randint(-10, 11);
|
|
81
149
|
} while (c + d + a / b < 0);
|
|
82
|
-
statement = new AddNode(new AddNode(new NumberNode(c), new NumberNode(d)), new DivideNode(new NumberNode(a), new NumberNode(b)));
|
|
83
|
-
startStatement = statement.toTex();
|
|
84
|
-
answer = (a / b + c + d).toString();
|
|
85
150
|
break;
|
|
86
151
|
case 3:
|
|
87
152
|
//a/b middle
|
|
@@ -91,9 +156,6 @@ const getOperationsPrioritiesWithoutRelative = () => {
|
|
|
91
156
|
a = b * randint(-10, 11);
|
|
92
157
|
} while (c + a / b < 0);
|
|
93
158
|
d = randint(-(c + a / b), 11, [0]);
|
|
94
|
-
statement = new AddNode(new AddNode(new NumberNode(c), new DivideNode(new NumberNode(a), new NumberNode(b))), new NumberNode(d));
|
|
95
|
-
startStatement = statement.toTex();
|
|
96
|
-
answer = (a / b + c + d).toString();
|
|
97
159
|
break;
|
|
98
160
|
}
|
|
99
161
|
break;
|
|
@@ -103,18 +165,12 @@ const getOperationsPrioritiesWithoutRelative = () => {
|
|
|
103
165
|
c = randint(-10, 11);
|
|
104
166
|
d = randint(1, 11);
|
|
105
167
|
} while (a * b + c * d < 0);
|
|
106
|
-
statement = new AddNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new MultiplyNode(new NumberNode(c), new NumberNode(d)));
|
|
107
|
-
startStatement = statement.toTex();
|
|
108
|
-
answer = (a * b + c * d).toString();
|
|
109
168
|
break;
|
|
110
169
|
case 4: // a*b ± c/d
|
|
111
|
-
if (
|
|
170
|
+
if (subFlip) {
|
|
112
171
|
[a, b] = [1, 2].map((el) => randint(1, 11));
|
|
113
172
|
d = randint(0, 11, [0]);
|
|
114
173
|
c = d * randint(-(a * b), 11);
|
|
115
|
-
statement = new AddNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new DivideNode(new NumberNode(c), new NumberNode(d)));
|
|
116
|
-
startStatement = statement.toTex();
|
|
117
|
-
answer = (a * b + c / d).toString();
|
|
118
174
|
}
|
|
119
175
|
else {
|
|
120
176
|
d = randint(0, 11, [0]);
|
|
@@ -123,9 +179,6 @@ const getOperationsPrioritiesWithoutRelative = () => {
|
|
|
123
179
|
a = randint(-10, 11);
|
|
124
180
|
b = randint(0, 11);
|
|
125
181
|
} while (c / d + a * b < 0);
|
|
126
|
-
statement = new AddNode(new DivideNode(new NumberNode(c), new NumberNode(d)), new MultiplyNode(new NumberNode(a), new NumberNode(b)));
|
|
127
|
-
startStatement = statement.toTex();
|
|
128
|
-
answer = (a * b + c / d).toString();
|
|
129
182
|
}
|
|
130
183
|
break;
|
|
131
184
|
case 5: // a/b ± c/d
|
|
@@ -135,17 +188,11 @@ const getOperationsPrioritiesWithoutRelative = () => {
|
|
|
135
188
|
d = randint(0, 11, [0]);
|
|
136
189
|
c = d * randint(-10, 11);
|
|
137
190
|
} while (a / b + c / d < 0);
|
|
138
|
-
statement = new AddNode(new DivideNode(new NumberNode(a), new NumberNode(b)), new DivideNode(new NumberNode(c), new NumberNode(d)));
|
|
139
|
-
startStatement = statement.toTex();
|
|
140
|
-
answer = (a / b + c / d).toString();
|
|
141
191
|
break;
|
|
142
192
|
case 6: // a*b*c ± d
|
|
143
|
-
if (
|
|
193
|
+
if (subFlip) {
|
|
144
194
|
[a, b, c] = [1, 2, 3].map((el) => randint(1, 11));
|
|
145
195
|
d = randint(-a * b * c, 11);
|
|
146
|
-
statement = new AddNode(new MultiplyNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new NumberNode(c)), new NumberNode(d));
|
|
147
|
-
startStatement = statement.toTex();
|
|
148
|
-
answer = (a * b * c + d).toString();
|
|
149
196
|
}
|
|
150
197
|
else {
|
|
151
198
|
d = randint(1, 11);
|
|
@@ -153,39 +200,22 @@ const getOperationsPrioritiesWithoutRelative = () => {
|
|
|
153
200
|
a = randint(-10, 11, [0]);
|
|
154
201
|
[b, c] = [1, 2].map((el) => randint(1, 11));
|
|
155
202
|
} while (a * b * c + d < 0);
|
|
156
|
-
statement = new AddNode(new MultiplyNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new NumberNode(c)), new NumberNode(d));
|
|
157
|
-
startStatement = statement.toTex();
|
|
158
|
-
answer = (a * b * c + d).toString();
|
|
159
203
|
}
|
|
160
204
|
break;
|
|
161
205
|
case 7: //a/b*c et c*a/b
|
|
162
206
|
b = randint(2, 10);
|
|
163
207
|
a = b * randint(2, 10);
|
|
164
208
|
c = randint(2, 10);
|
|
165
|
-
statement = new MultiplyNode(new DivideNode(a.toTree(), b.toTree()), c.toTree()).shuffle();
|
|
166
|
-
answer = ((a / b) * c).frenchify();
|
|
167
|
-
startStatement = statement.toTex();
|
|
168
209
|
break;
|
|
169
210
|
case 8: //a+-b+-c
|
|
211
|
+
default:
|
|
170
212
|
a = randint(5, 15);
|
|
171
213
|
b = randint(-a, 10);
|
|
172
214
|
c = b > 0 ? randint(-(a + b), 0) : randint(-(a + b), 10);
|
|
173
|
-
statement = new AddNode(new AddNode(a.toTree(), b.toTree()), c.toTree());
|
|
174
|
-
answer = (a + b + c).frenchify();
|
|
175
|
-
startStatement = statement.toTex();
|
|
176
215
|
break;
|
|
177
|
-
default:
|
|
178
|
-
throw Error("impossible");
|
|
179
216
|
}
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
startStatement,
|
|
183
|
-
answer,
|
|
184
|
-
keys: [],
|
|
185
|
-
answerFormat: "tex",
|
|
186
|
-
identifiers: { a, b, c, d, flip, type },
|
|
187
|
-
};
|
|
188
|
-
return question;
|
|
217
|
+
const identifiers = { a, b, c, d, flip, type, subFlip };
|
|
218
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
189
219
|
};
|
|
190
220
|
const getPropositions = (n, { answer }) => {
|
|
191
221
|
const propositions = [];
|
|
@@ -204,8 +234,6 @@ export const operationsPrioritiesWithoutRelative = {
|
|
|
204
234
|
id: "operationsPrioritiesWithoutRelative",
|
|
205
235
|
connector: "=",
|
|
206
236
|
label: "Priorités opératoires sans les nombres relatifs",
|
|
207
|
-
levels: ["6ème", "5ème", "4ème"],
|
|
208
|
-
sections: ["Calculs"],
|
|
209
237
|
isSingleStep: true,
|
|
210
238
|
generator: (nb) => getDistinctQuestions(getOperationsPrioritiesWithoutRelative, nb),
|
|
211
239
|
qcmTimer: 60,
|
|
@@ -213,4 +241,5 @@ export const operationsPrioritiesWithoutRelative = {
|
|
|
213
241
|
getPropositions,
|
|
214
242
|
isAnswerValid,
|
|
215
243
|
subject: "Mathématiques",
|
|
244
|
+
getQuestionFromIdentifiers,
|
|
216
245
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimalOrdering.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"decimalOrdering.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAoF1D,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
|
|
@@ -3,6 +3,33 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
|
|
|
3
3
|
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
5
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
6
|
+
const getInstruction = (identifiers) => {
|
|
7
|
+
const { a, b } = identifiers;
|
|
8
|
+
return `Compléter par le bon symbole :
|
|
9
|
+
|
|
10
|
+
$$
|
|
11
|
+
${a.frenchify()}\\ ...... \\ ${b.frenchify()}
|
|
12
|
+
$$`;
|
|
13
|
+
};
|
|
14
|
+
const getAnswer = (identifiers) => {
|
|
15
|
+
const { a, b } = identifiers;
|
|
16
|
+
const answer = a < b ? "<" : a === b ? "=" : ">";
|
|
17
|
+
return answer;
|
|
18
|
+
};
|
|
19
|
+
// const getHint: GetHint<Identifiers> =(identifiers)=>{
|
|
20
|
+
// }
|
|
21
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers)=>{
|
|
22
|
+
// }
|
|
23
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
24
|
+
const question = {
|
|
25
|
+
answer: getAnswer(identifiers),
|
|
26
|
+
instruction: getInstruction(identifiers),
|
|
27
|
+
keys: [],
|
|
28
|
+
answerFormat: "tex",
|
|
29
|
+
identifiers,
|
|
30
|
+
};
|
|
31
|
+
return question;
|
|
32
|
+
};
|
|
6
33
|
const getDecimalOrderingQuestion = () => {
|
|
7
34
|
const type = randint(1, 5);
|
|
8
35
|
let a = 0;
|
|
@@ -34,19 +61,8 @@ const getDecimalOrderingQuestion = () => {
|
|
|
34
61
|
break;
|
|
35
62
|
}
|
|
36
63
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
answer,
|
|
40
|
-
instruction: `Compléter par le bon symbole :
|
|
41
|
-
|
|
42
|
-
$$
|
|
43
|
-
${a.frenchify()}\\ ...... \\ ${b.frenchify()}
|
|
44
|
-
$$`,
|
|
45
|
-
keys: [],
|
|
46
|
-
answerFormat: "tex",
|
|
47
|
-
identifiers: { type, a, b },
|
|
48
|
-
};
|
|
49
|
-
return question;
|
|
64
|
+
const identifiers = { type, a, b };
|
|
65
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
50
66
|
};
|
|
51
67
|
const getPropositions = (n, { answer }) => {
|
|
52
68
|
const propositions = [];
|
|
@@ -71,4 +87,5 @@ export const decimalOrdering = {
|
|
|
71
87
|
isAnswerValid,
|
|
72
88
|
subject: "Mathématiques",
|
|
73
89
|
answerType: "QCU",
|
|
90
|
+
getQuestionFromIdentifiers,
|
|
74
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimalOrderingNoRelatives.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrderingNoRelatives.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"decimalOrderingNoRelatives.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrderingNoRelatives.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAmF1D,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAgB5D,CAAC"}
|
|
@@ -3,6 +3,29 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
|
|
|
3
3
|
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
5
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
6
|
+
const getInstruction = (identifiers) => {
|
|
7
|
+
const { a, b } = identifiers;
|
|
8
|
+
return `Compléter par le bon symbole :
|
|
9
|
+
|
|
10
|
+
$$
|
|
11
|
+
${a.frenchify()}\\ ...... \\ ${b.frenchify()}
|
|
12
|
+
$$`;
|
|
13
|
+
};
|
|
14
|
+
const getAnswer = (identifiers) => {
|
|
15
|
+
const { a, b } = identifiers;
|
|
16
|
+
const answer = a < b ? "<" : a === b ? "=" : ">";
|
|
17
|
+
return answer;
|
|
18
|
+
};
|
|
19
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
20
|
+
const question = {
|
|
21
|
+
answer: getAnswer(identifiers),
|
|
22
|
+
instruction: getInstruction(identifiers),
|
|
23
|
+
keys: [],
|
|
24
|
+
answerFormat: "tex",
|
|
25
|
+
identifiers,
|
|
26
|
+
};
|
|
27
|
+
return question;
|
|
28
|
+
};
|
|
6
29
|
const getDecimalOrderingNoRelativesQuestion = () => {
|
|
7
30
|
const type = randint(1, 5);
|
|
8
31
|
let a = 0;
|
|
@@ -34,19 +57,8 @@ const getDecimalOrderingNoRelativesQuestion = () => {
|
|
|
34
57
|
break;
|
|
35
58
|
}
|
|
36
59
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
answer,
|
|
40
|
-
instruction: `Compléter par le bon symbole :
|
|
41
|
-
|
|
42
|
-
$$
|
|
43
|
-
${a.frenchify()}\\ ...... \\ ${b.frenchify()}
|
|
44
|
-
$$`,
|
|
45
|
-
keys: [],
|
|
46
|
-
answerFormat: "tex",
|
|
47
|
-
identifiers: { type, a, b },
|
|
48
|
-
};
|
|
49
|
-
return question;
|
|
60
|
+
const identifiers = { type, a, b };
|
|
61
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
50
62
|
};
|
|
51
63
|
const getPropositions = (n, { answer }) => {
|
|
52
64
|
const propositions = [];
|
|
@@ -73,4 +85,5 @@ export const decimalOrderingNoRelatives = {
|
|
|
73
85
|
isAnswerValid,
|
|
74
86
|
subject: "Mathématiques",
|
|
75
87
|
answerType: "QCU",
|
|
88
|
+
getQuestionFromIdentifiers,
|
|
76
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framing.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/framing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"framing.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/framing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAqBrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AA2KF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAazC,CAAC"}
|