math-exercises 3.0.69 → 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/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
|
@@ -3,33 +3,53 @@ import { randint } from "../../../../math/utils/random/randint.js";
|
|
|
3
3
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
4
4
|
import { addValidProp, tryToAddWrongProp, } from "../../../exercise.js";
|
|
5
5
|
import { getDistinctQuestions } from "../../../utils/getDistinctQuestions.js";
|
|
6
|
-
const
|
|
7
|
-
const firstValue =
|
|
8
|
-
const reason = randint(-10, 10, [0]);
|
|
9
|
-
let randValue = firstValue;
|
|
6
|
+
const getInstruction = (identifiers) => {
|
|
7
|
+
const { firstValue, reason, randValue } = identifiers;
|
|
10
8
|
const formula = new Polynomial([firstValue, reason], "n");
|
|
11
|
-
let instruction = `$(u_n)$ est une suite arithmétique définie par
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
let instruction = `$(u_n)$ est une suite arithmétique définie par
|
|
10
|
+
|
|
11
|
+
$$
|
|
12
|
+
u_n = ${formula.toTree().toTex()}
|
|
13
|
+
$$
|
|
14
|
+
|
|
15
|
+
`;
|
|
14
16
|
if (reason > 0) {
|
|
15
|
-
randValue += randint(reason, 100);
|
|
16
17
|
instruction += `À partir de quel rang $n$ a-t-on $u_n > ${randValue}$ ?`;
|
|
17
18
|
}
|
|
18
19
|
else {
|
|
19
|
-
randValue += randint(-100, reason);
|
|
20
20
|
instruction += `À partir de quel rang $n$ a-t-on $u_n < ${randValue}$ ?`;
|
|
21
21
|
}
|
|
22
|
+
return instruction;
|
|
23
|
+
};
|
|
24
|
+
const getAnswer = (identifiers) => {
|
|
25
|
+
const { firstValue, reason, randValue } = identifiers;
|
|
22
26
|
const answer = (Math.floor((randValue - firstValue) / reason) + 1).toString();
|
|
27
|
+
return answer;
|
|
28
|
+
};
|
|
29
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
23
30
|
const question = {
|
|
24
|
-
instruction,
|
|
31
|
+
instruction: getInstruction(identifiers),
|
|
25
32
|
startStatement: `n`,
|
|
26
|
-
answer,
|
|
33
|
+
answer: getAnswer(identifiers),
|
|
27
34
|
keys: ["r", "n", "u", "underscore", "inf", "sup", "approx"],
|
|
28
35
|
answerFormat: "tex",
|
|
29
|
-
identifiers
|
|
36
|
+
identifiers,
|
|
30
37
|
};
|
|
31
38
|
return question;
|
|
32
39
|
};
|
|
40
|
+
const getArithmeticThresholdFind = () => {
|
|
41
|
+
const firstValue = randint(-10, 10);
|
|
42
|
+
const reason = randint(-10, 10, [0]);
|
|
43
|
+
let randValue = firstValue;
|
|
44
|
+
if (reason > 0) {
|
|
45
|
+
randValue += randint(reason, 100);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
randValue += randint(-100, reason);
|
|
49
|
+
}
|
|
50
|
+
const identifiers = { randValue, firstValue, reason };
|
|
51
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
52
|
+
};
|
|
33
53
|
const getPropositions = (n, { answer, randValue, firstValue, reason }) => {
|
|
34
54
|
const propositions = [];
|
|
35
55
|
addValidProp(propositions, answer);
|
|
@@ -45,8 +65,6 @@ export const arithmeticThresholdFind = {
|
|
|
45
65
|
id: "arithmeticThresholdFind",
|
|
46
66
|
connector: "=",
|
|
47
67
|
label: "Calculer un seuil à l'aide d'une suite arithmétique",
|
|
48
|
-
levels: ["1reESM", "1reSpé", "1reTech", "1rePro", "TermTech", "TermPro"],
|
|
49
|
-
sections: ["Suites"],
|
|
50
68
|
isSingleStep: false,
|
|
51
69
|
generator: (nb) => getDistinctQuestions(getArithmeticThresholdFind, nb),
|
|
52
70
|
qcmTimer: 60,
|
|
@@ -54,4 +72,5 @@ export const arithmeticThresholdFind = {
|
|
|
54
72
|
getPropositions,
|
|
55
73
|
isAnswerValid,
|
|
56
74
|
subject: "Mathématiques",
|
|
75
|
+
getQuestionFromIdentifiers,
|
|
57
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstIntegersSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/firstIntegersSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"firstIntegersSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/firstIntegersSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoFF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAkBlD,CAAC"}
|
|
@@ -20,6 +20,9 @@ const getAnswer = (identifiers) => {
|
|
|
20
20
|
const getFirstIntegersSumQuestion = () => {
|
|
21
21
|
const final = randint(20, 100);
|
|
22
22
|
const identifiers = { final };
|
|
23
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
24
|
+
};
|
|
25
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
23
26
|
const question = {
|
|
24
27
|
answer: getAnswer(identifiers),
|
|
25
28
|
instruction: getInstruction(identifiers),
|
|
@@ -75,9 +78,7 @@ export const firstIntegersSum = {
|
|
|
75
78
|
id: "firstIntegersSum",
|
|
76
79
|
connector: "=",
|
|
77
80
|
label: "Somme des $n$ premiers entiers",
|
|
78
|
-
levels: ["1rePro", "1reTech", "1reSpé", "1reESM"],
|
|
79
81
|
isSingleStep: true,
|
|
80
|
-
sections: ["Suites"],
|
|
81
82
|
generator: (nb) => getDistinctQuestions(getFirstIntegersSumQuestion, nb),
|
|
82
83
|
qcmTimer: 60,
|
|
83
84
|
freeTimer: 60,
|
|
@@ -89,4 +90,5 @@ export const firstIntegersSum = {
|
|
|
89
90
|
getHint,
|
|
90
91
|
getCorrection,
|
|
91
92
|
hasHintAndCorrection: true,
|
|
93
|
+
getQuestionFromIdentifiers,
|
|
92
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recognizeArithmeticFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"recognizeArithmeticFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAoGF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAenE,CAAC"}
|
|
@@ -3,6 +3,38 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
|
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
4
|
import { random } from "../../../../utils/alea/random.js";
|
|
5
5
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
6
|
+
const getInstruction = (identifiers) => {
|
|
7
|
+
return `Parmi les suites suivantes, laquelle semble être arithmétique ?`;
|
|
8
|
+
};
|
|
9
|
+
const getAnswer = (identifiers) => {
|
|
10
|
+
const { sequences, answerIndex } = identifiers;
|
|
11
|
+
const names = ["u", "v", "w", "z"];
|
|
12
|
+
const rightSequence = sequences[answerIndex];
|
|
13
|
+
const answer = `\\text{Suite } ${names[answerIndex]} : \\quad ${rightSequence.join("\\ ; \\ ")}`;
|
|
14
|
+
return answer;
|
|
15
|
+
};
|
|
16
|
+
const getHint = (identifiers) => {
|
|
17
|
+
return `Une suite est arithmétique lorsque, pour passer d'un terme au suivant, on additionne ou on soustrait toujours par le même nombre.`;
|
|
18
|
+
};
|
|
19
|
+
const getCorrection = (identifiers) => {
|
|
20
|
+
const { sequences, answerIndex } = identifiers;
|
|
21
|
+
const names = ["u", "v", "w", "z"];
|
|
22
|
+
const rightSequence = sequences[answerIndex];
|
|
23
|
+
const reason = rightSequence[1] - rightSequence[0];
|
|
24
|
+
return `La suite $${names[answerIndex]}$ semble bien être arithmétique, puisque pour passer d'un terme au suivant, on additionne par $${reason}$.`;
|
|
25
|
+
};
|
|
26
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
27
|
+
const question = {
|
|
28
|
+
answer: getAnswer(identifiers),
|
|
29
|
+
instruction: getInstruction(identifiers),
|
|
30
|
+
keys: [],
|
|
31
|
+
answerFormat: "tex",
|
|
32
|
+
hint: getHint(identifiers),
|
|
33
|
+
correction: getCorrection(identifiers),
|
|
34
|
+
identifiers,
|
|
35
|
+
};
|
|
36
|
+
return question;
|
|
37
|
+
};
|
|
6
38
|
const getRecognizeArithmeticFromFirstTermsQuestion = () => {
|
|
7
39
|
const sequences = [];
|
|
8
40
|
const firstGeoTerm = randint(1, 4);
|
|
@@ -30,18 +62,8 @@ const getRecognizeArithmeticFromFirstTermsQuestion = () => {
|
|
|
30
62
|
.map((el, index) => firstTerm + index * reason);
|
|
31
63
|
const answerIndex = randint(0, 4);
|
|
32
64
|
sequences.splice(answerIndex, 0, rightSequence);
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
const question = {
|
|
36
|
-
answer,
|
|
37
|
-
instruction: `Parmi les suites suivantes, laquelle semble être arithmétique ?`,
|
|
38
|
-
keys: [],
|
|
39
|
-
answerFormat: "tex",
|
|
40
|
-
hint: `Une suite est arithmétique lorsque, pour passer d'un terme au suivant, on additionne ou on soustrait toujours par le même nombre.`,
|
|
41
|
-
correction: `La suite $${names[answerIndex]}$ semble bien être arithmétique, puisque pour passer d'un terme au suivant, on additionne par $${reason}$.`,
|
|
42
|
-
identifiers: { sequences, answerIndex },
|
|
43
|
-
};
|
|
44
|
-
return question;
|
|
65
|
+
const identifiers = { sequences, answerIndex };
|
|
66
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
45
67
|
};
|
|
46
68
|
const getPropositions = (n, { answer, sequences, answerIndex }) => {
|
|
47
69
|
const propositions = [];
|
|
@@ -60,9 +82,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
60
82
|
export const recognizeArithmeticFromFirstTerms = {
|
|
61
83
|
id: "recognizeArithmeticFromFirstTerms",
|
|
62
84
|
label: "Reconnaître une suite arithmétique via ses premiers termes",
|
|
63
|
-
levels: ["1reSpé", "1rePro", "1reTech", "1reESM"],
|
|
64
85
|
isSingleStep: true,
|
|
65
|
-
sections: ["Suites"],
|
|
66
86
|
generator: (nb) => getDistinctQuestions(getRecognizeArithmeticFromFirstTermsQuestion, nb),
|
|
67
87
|
qcmTimer: 60,
|
|
68
88
|
freeTimer: 60,
|
|
@@ -72,4 +92,5 @@ export const recognizeArithmeticFromFirstTerms = {
|
|
|
72
92
|
subject: "Mathématiques",
|
|
73
93
|
hasHintAndCorrection: true,
|
|
74
94
|
pdfOptions: { shouldSpreadPropositions: true },
|
|
95
|
+
getQuestionFromIdentifiers,
|
|
75
96
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recognizeArithmeticFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"recognizeArithmeticFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAiGF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAc9D,CAAC"}
|
|
@@ -5,6 +5,40 @@ import { Point } from "../../../../math/geometry/point.js";
|
|
|
5
5
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
6
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
7
7
|
import { random } from "../../../../utils/alea/random.js";
|
|
8
|
+
const getInstruction = (identifiers) => {
|
|
9
|
+
return `La suite $u$ représentée ci-dessous semble-t-elle arithmétique ?`;
|
|
10
|
+
};
|
|
11
|
+
const getAnswer = (identifiers) => {
|
|
12
|
+
const { isAri, sequence } = identifiers;
|
|
13
|
+
return isAri ? "Oui" : "Non";
|
|
14
|
+
};
|
|
15
|
+
const getGGBOptions = (identifiers) => {
|
|
16
|
+
const { isAri, sequence } = identifiers;
|
|
17
|
+
const commands = sequence.flatMap((nb, index) => new Point(`A_${index}`, index.toTree(), nb.toTree()).toGGBCommand({
|
|
18
|
+
showLabel: false,
|
|
19
|
+
}));
|
|
20
|
+
const ggb = new GeogebraConstructor({
|
|
21
|
+
commands,
|
|
22
|
+
lockedAxesRatio: false,
|
|
23
|
+
xAxis: { natural: true },
|
|
24
|
+
});
|
|
25
|
+
const yMin = Math.min(...sequence.slice(0, 5));
|
|
26
|
+
const yMax = Math.max(...sequence.slice(0, 5));
|
|
27
|
+
return ggb.getOptions({
|
|
28
|
+
coords: [-1, 7, Math.min(-1, yMin - 2), Math.max(1, yMax + 2)],
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
32
|
+
const question = {
|
|
33
|
+
answer: getAnswer(identifiers),
|
|
34
|
+
instruction: getInstruction(identifiers),
|
|
35
|
+
keys: [],
|
|
36
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
37
|
+
answerFormat: "tex",
|
|
38
|
+
identifiers,
|
|
39
|
+
};
|
|
40
|
+
return question;
|
|
41
|
+
};
|
|
8
42
|
const getRandomFirstNonAriTerms = () => {
|
|
9
43
|
const type = randint(0, 3);
|
|
10
44
|
switch (type) {
|
|
@@ -38,28 +72,8 @@ const getRecognizeArithmeticFromGraphQuestion = () => {
|
|
|
38
72
|
const sequence = isAri
|
|
39
73
|
? new Array(10).fill(0).map((el, index) => firstAriTerm + reason * index)
|
|
40
74
|
: getRandomFirstNonAriTerms();
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
showLabel: false,
|
|
44
|
-
}));
|
|
45
|
-
const ggb = new GeogebraConstructor({
|
|
46
|
-
commands,
|
|
47
|
-
lockedAxesRatio: false,
|
|
48
|
-
xAxis: { natural: true },
|
|
49
|
-
});
|
|
50
|
-
const yMin = Math.min(...sequence.slice(0, 5));
|
|
51
|
-
const yMax = Math.max(...sequence.slice(0, 5));
|
|
52
|
-
const question = {
|
|
53
|
-
answer,
|
|
54
|
-
instruction: `La suite $u$ représentée ci-dessous semble-t-elle arithmétique ?`,
|
|
55
|
-
keys: [],
|
|
56
|
-
ggbOptions: ggb.getOptions({
|
|
57
|
-
coords: [-1, 7, Math.min(-1, yMin - 2), Math.max(1, yMax + 2)],
|
|
58
|
-
}),
|
|
59
|
-
answerFormat: "tex",
|
|
60
|
-
identifiers: { sequence, isAri },
|
|
61
|
-
};
|
|
62
|
-
return question;
|
|
75
|
+
const identifiers = { sequence, isAri };
|
|
76
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
63
77
|
};
|
|
64
78
|
const getPropositions = (n, { answer }) => {
|
|
65
79
|
const propositions = [];
|
|
@@ -74,9 +88,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
74
88
|
export const recognizeArithmeticFromGraph = {
|
|
75
89
|
id: "recognizeArithmeticFromGraph",
|
|
76
90
|
label: "Reconnaître graphiquement si une suite est arithmétique",
|
|
77
|
-
levels: ["1reESM", "1rePro", "1reSpé", "1reTech"],
|
|
78
91
|
isSingleStep: true,
|
|
79
|
-
sections: ["Suites"],
|
|
80
92
|
generator: (nb) => getDistinctQuestions(getRecognizeArithmeticFromGraphQuestion, nb),
|
|
81
93
|
qcmTimer: 60,
|
|
82
94
|
freeTimer: 60,
|
|
@@ -85,4 +97,5 @@ export const recognizeArithmeticFromGraph = {
|
|
|
85
97
|
answerType: "QCU",
|
|
86
98
|
hasGeogebra: true,
|
|
87
99
|
subject: "Mathématiques",
|
|
100
|
+
getQuestionFromIdentifiers,
|
|
88
101
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recognizeReasonFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeReasonFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"recognizeReasonFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeReasonFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAsEF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAkB/D,CAAC"}
|
|
@@ -34,6 +34,9 @@ const getRecognizeReasonFromFirstTermsQuestion = () => {
|
|
|
34
34
|
.fill(0)
|
|
35
35
|
.map((el, index) => firstTerm + index * reason);
|
|
36
36
|
const identifiers = { sequence, reason };
|
|
37
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
38
|
+
};
|
|
39
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
37
40
|
const question = {
|
|
38
41
|
answer: getAnswer(identifiers),
|
|
39
42
|
instruction: getInstruction(identifiers),
|
|
@@ -72,4 +75,5 @@ export const recognizeReasonFromFirstTerms = {
|
|
|
72
75
|
getHint,
|
|
73
76
|
getCorrection,
|
|
74
77
|
hasHintAndCorrection: true,
|
|
78
|
+
getQuestionFromIdentifiers,
|
|
75
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recognizeReasonFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"recognizeReasonFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAqEF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAa1D,CAAC"}
|
|
@@ -3,12 +3,16 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
|
|
|
3
3
|
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
4
4
|
import { Point } from "../../../../math/geometry/point.js";
|
|
5
5
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
const getInstruction = (identifiers) => {
|
|
7
|
+
return `Déterminer la raison de la suite arithmétique $u$ représentée ci-dessous :`;
|
|
8
|
+
};
|
|
9
|
+
const getAnswer = (identifiers) => {
|
|
10
|
+
const { reason } = identifiers;
|
|
11
|
+
const answer = reason + "";
|
|
12
|
+
return answer;
|
|
13
|
+
};
|
|
14
|
+
const getGGBOptions = (identifiers) => {
|
|
15
|
+
const { sequence } = identifiers;
|
|
12
16
|
const yMin = Math.min(...sequence.slice(0, 5));
|
|
13
17
|
const yMax = Math.max(...sequence.slice(0, 5));
|
|
14
18
|
const commands = sequence.flatMap((nb, index) => new Point(`A_${index}`, index.toTree(), nb.toTree()).toGGBCommand({
|
|
@@ -19,19 +23,30 @@ const getRecognizeReasonFromGraphQuestion = () => {
|
|
|
19
23
|
xAxis: { natural: true },
|
|
20
24
|
lockedAxesRatio: false,
|
|
21
25
|
});
|
|
22
|
-
|
|
26
|
+
return ggb.getOptions({
|
|
27
|
+
coords: [-1, 7, Math.min(-1, yMin - 2), Math.max(1, yMax + 2)],
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
23
31
|
const question = {
|
|
24
|
-
answer,
|
|
25
|
-
instruction:
|
|
32
|
+
answer: getAnswer(identifiers),
|
|
33
|
+
instruction: getInstruction(identifiers),
|
|
26
34
|
keys: [],
|
|
27
|
-
ggbOptions:
|
|
28
|
-
coords: [-1, 7, Math.min(-1, yMin - 2), Math.max(1, yMax + 2)],
|
|
29
|
-
}),
|
|
35
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
30
36
|
answerFormat: "tex",
|
|
31
|
-
identifiers
|
|
37
|
+
identifiers,
|
|
32
38
|
};
|
|
33
39
|
return question;
|
|
34
40
|
};
|
|
41
|
+
const getRecognizeReasonFromGraphQuestion = () => {
|
|
42
|
+
const firstTerm = randint(1, 20);
|
|
43
|
+
const reason = randint(-5, 6, [0]);
|
|
44
|
+
const sequence = new Array(10)
|
|
45
|
+
.fill(0)
|
|
46
|
+
.map((el, index) => firstTerm + index * reason);
|
|
47
|
+
const identifiers = { reason, sequence };
|
|
48
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
49
|
+
};
|
|
35
50
|
const getPropositions = (n, { answer }) => {
|
|
36
51
|
const propositions = [];
|
|
37
52
|
addValidProp(propositions, answer);
|
|
@@ -46,9 +61,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
46
61
|
export const recognizeReasonFromGraph = {
|
|
47
62
|
id: "recognizeReasonFromGraph",
|
|
48
63
|
label: "Reconnaître graphiquement la raison d'une suite arithmétique",
|
|
49
|
-
levels: ["1reESM", "1reSpé", "1rePro", "1reTech"],
|
|
50
64
|
isSingleStep: true,
|
|
51
|
-
sections: ["Suites"],
|
|
52
65
|
generator: (nb) => getDistinctQuestions(getRecognizeReasonFromGraphQuestion, nb),
|
|
53
66
|
qcmTimer: 60,
|
|
54
67
|
freeTimer: 60,
|
|
@@ -56,4 +69,5 @@ export const recognizeReasonFromGraph = {
|
|
|
56
69
|
isAnswerValid,
|
|
57
70
|
hasGeogebra: true,
|
|
58
71
|
subject: "Mathématiques",
|
|
72
|
+
getQuestionFromIdentifiers,
|
|
59
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/explicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,
|
|
1
|
+
{"version":3,"file":"explicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/explicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAyDF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}
|
|
@@ -2,21 +2,39 @@ import { shuffleProps, tryToAddWrongProp, addValidProp, } from "../../../exercis
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { Polynomial, PolynomialConstructor, } from "../../../math/polynomials/polynomial.js";
|
|
4
4
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { rank, coeffs } = identifiers;
|
|
7
|
+
const u = new Polynomial(coeffs);
|
|
8
|
+
return `Soit $u$ la suite définie pour tout $n\\geq 0$ par
|
|
9
|
+
|
|
10
|
+
$$
|
|
11
|
+
u_n = ${u.toTree().toTex()}
|
|
12
|
+
$$
|
|
13
|
+
|
|
14
|
+
Calculer $u_${rank}$.`;
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
const { rank, coeffs } = identifiers;
|
|
18
|
+
const u = new Polynomial(coeffs);
|
|
8
19
|
const answer = u.calculate(rank) + "";
|
|
20
|
+
return answer;
|
|
21
|
+
};
|
|
22
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
9
23
|
const question = {
|
|
10
|
-
answer:
|
|
11
|
-
instruction:
|
|
12
|
-
.toTree()
|
|
13
|
-
.toTex()}$. Calculer $u_${rank}$.`,
|
|
24
|
+
answer: getAnswer(identifiers),
|
|
25
|
+
instruction: getInstruction(identifiers),
|
|
14
26
|
keys: ["u", "underscore", "equal"],
|
|
15
27
|
answerFormat: "tex",
|
|
16
|
-
identifiers
|
|
28
|
+
identifiers,
|
|
17
29
|
};
|
|
18
30
|
return question;
|
|
19
31
|
};
|
|
32
|
+
const getExplicitFormulaUsageQuestion = () => {
|
|
33
|
+
const u = PolynomialConstructor.randomWithOrder(2, "n");
|
|
34
|
+
const rank = randint(0, 4);
|
|
35
|
+
const identifiers = { rank, coeffs: u.coefficients };
|
|
36
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
37
|
+
};
|
|
20
38
|
const getPropositions = (n, { answer, rank, coeffs }) => {
|
|
21
39
|
const propositions = [];
|
|
22
40
|
const u = new Polynomial(coeffs);
|
|
@@ -36,13 +54,12 @@ export const explicitFormulaUsage = {
|
|
|
36
54
|
id: "explicitFormulaUsage",
|
|
37
55
|
connector: "=",
|
|
38
56
|
label: "Utiliser la formule explicite d'une suite",
|
|
39
|
-
levels: ["1reESM", "1reSpé", "1reTech"],
|
|
40
57
|
isSingleStep: true,
|
|
41
|
-
sections: ["Suites"],
|
|
42
58
|
generator: (nb) => getDistinctQuestions(getExplicitFormulaUsageQuestion, nb),
|
|
43
59
|
qcmTimer: 60,
|
|
44
60
|
freeTimer: 60,
|
|
45
61
|
getPropositions,
|
|
46
62
|
isAnswerValid,
|
|
47
63
|
subject: "Mathématiques",
|
|
64
|
+
getQuestionFromIdentifiers,
|
|
48
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genericSequenceVariations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/genericSequenceVariations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,
|
|
1
|
+
{"version":3,"file":"genericSequenceVariations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/genericSequenceVariations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAqEF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { shuffleProps, tryToAddWrongProp, addValidProp, } from "../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
-
import { PolynomialConstructor } from "../../../math/polynomials/polynomial.js";
|
|
3
|
+
import { Polynomial, PolynomialConstructor, } from "../../../math/polynomials/polynomial.js";
|
|
4
4
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { coeffs } = identifiers;
|
|
7
|
+
const u = new Polynomial(coeffs);
|
|
8
|
+
return `Soit $u$ la suite définie par $u_n = ${u
|
|
9
|
+
.toTree()
|
|
10
|
+
.toTex()}$. Quel est le sens de variations de $u$ ?`;
|
|
11
|
+
};
|
|
12
|
+
const getAnswer = (identifiers) => {
|
|
13
|
+
const { coeffs } = identifiers;
|
|
14
|
+
const u = new Polynomial(coeffs);
|
|
7
15
|
const [b, a] = u.coefficients.slice(1);
|
|
8
16
|
const root = Math.ceil((-a - b) / (2 * a));
|
|
9
17
|
const answer = root <= 0
|
|
@@ -11,17 +19,23 @@ const getGenericSequenceVariationsQuestion = () => {
|
|
|
11
19
|
? "Croissante"
|
|
12
20
|
: "Décroissante"
|
|
13
21
|
: `${a > 0 ? "Croissante" : "Décroissante"} à partir du rang ${root}`;
|
|
22
|
+
return answer;
|
|
23
|
+
};
|
|
24
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
14
25
|
const question = {
|
|
15
|
-
answer,
|
|
16
|
-
instruction:
|
|
17
|
-
.toTree()
|
|
18
|
-
.toTex()}$. Quel est le sens de variations de $u$ ?`,
|
|
26
|
+
answer: getAnswer(identifiers),
|
|
27
|
+
instruction: getInstruction(identifiers),
|
|
19
28
|
keys: [],
|
|
20
29
|
answerFormat: "raw",
|
|
21
|
-
identifiers
|
|
30
|
+
identifiers,
|
|
22
31
|
};
|
|
23
32
|
return question;
|
|
24
33
|
};
|
|
34
|
+
const getGenericSequenceVariationsQuestion = () => {
|
|
35
|
+
const u = PolynomialConstructor.randomWithOrder(2, "n");
|
|
36
|
+
const identifiers = { coeffs: u.coefficients };
|
|
37
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
38
|
+
};
|
|
25
39
|
const getPropositions = (n, { answer, coeffs }) => {
|
|
26
40
|
const [b, a] = coeffs.slice(1);
|
|
27
41
|
const root = Math.ceil((-a - b) / (2 * a));
|
|
@@ -38,13 +52,12 @@ export const genericSequenceVariations = {
|
|
|
38
52
|
id: "genericSequenceVariations",
|
|
39
53
|
connector: "=",
|
|
40
54
|
label: "Déterminer le sens de variations d'une suite en étudiant la différence de deux termes",
|
|
41
|
-
levels: ["1reESM", "1rePro", "1reTech"],
|
|
42
55
|
isSingleStep: true,
|
|
43
|
-
sections: ["Suites"],
|
|
44
56
|
generator: (nb) => getDistinctQuestions(getGenericSequenceVariationsQuestion, nb),
|
|
45
57
|
qcmTimer: 60,
|
|
46
58
|
freeTimer: 60,
|
|
47
59
|
answerType: "QCU",
|
|
48
60
|
getPropositions,
|
|
49
61
|
subject: "Mathématiques",
|
|
62
|
+
getQuestionFromIdentifiers,
|
|
50
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometricExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"geometricExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAkGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAmB/D,CAAC"}
|
|
@@ -41,14 +41,21 @@ ${alignTex([
|
|
|
41
41
|
const getKeys = () => {
|
|
42
42
|
return [];
|
|
43
43
|
};
|
|
44
|
+
const getStartStatement = (identifiers) => {
|
|
45
|
+
const { askedRank } = identifiers;
|
|
46
|
+
return `u_{${askedRank}}`;
|
|
47
|
+
};
|
|
44
48
|
const getGeometricExplicitFormulaUsage = () => {
|
|
45
49
|
const askedRank = randint(0, 10);
|
|
46
50
|
const firstValue = randint(-5, 10, [0]);
|
|
47
51
|
const reason = randint(2, 10);
|
|
48
52
|
const identifiers = { firstValue, reason, askedRank };
|
|
53
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
54
|
+
};
|
|
55
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
49
56
|
const question = {
|
|
50
57
|
instruction: getInstruction(identifiers),
|
|
51
|
-
startStatement:
|
|
58
|
+
startStatement: getStartStatement(identifiers),
|
|
52
59
|
answer: getAnswer(identifiers),
|
|
53
60
|
keys: getKeys(identifiers),
|
|
54
61
|
answerFormat: "tex",
|
|
@@ -81,8 +88,6 @@ export const geometricExplicitFormulaUsage = {
|
|
|
81
88
|
id: "geometricExplicitFormulaUsage",
|
|
82
89
|
connector: "=",
|
|
83
90
|
label: "Utiliser la formule générale d'une suite géométrique",
|
|
84
|
-
levels: ["1reESM", "1reSpé", "1reTech", "1rePro", "TermTech", "TermPro"],
|
|
85
|
-
sections: ["Suites"],
|
|
86
91
|
isSingleStep: false,
|
|
87
92
|
generator: (nb) => getDistinctQuestions(getGeometricExplicitFormulaUsage, nb),
|
|
88
93
|
qcmTimer: 60,
|
|
@@ -96,4 +101,5 @@ export const geometricExplicitFormulaUsage = {
|
|
|
96
101
|
getHint,
|
|
97
102
|
getCorrection,
|
|
98
103
|
getKeys,
|
|
104
|
+
getQuestionFromIdentifiers,
|
|
99
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometricFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"geometricFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAiHF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAc9D,CAAC"}
|