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,55 +1,27 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
|
|
4
|
-
import { AffineConstructor } from "../../../math/polynomials/affine.js";
|
|
4
|
+
import { Affine, AffineConstructor } from "../../../math/polynomials/affine.js";
|
|
5
5
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
6
6
|
import { random } from "../../../utils/alea/random.js";
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const question = {
|
|
11
|
-
answer: exo.answer,
|
|
12
|
-
instruction: exo.instruction,
|
|
13
|
-
ggbOptions: ggb.getOptions({
|
|
14
|
-
coords: exo.coords,
|
|
15
|
-
}),
|
|
16
|
-
keys: [],
|
|
17
|
-
answerFormat: "raw",
|
|
18
|
-
identifiers: { movementType: exo.answer, ggbCommands: ggb.commands },
|
|
19
|
-
};
|
|
20
|
-
return question;
|
|
21
|
-
};
|
|
22
|
-
const getPropositions = (n, { answer }) => {
|
|
23
|
-
const propositions = [];
|
|
24
|
-
addValidProp(propositions, answer, "raw");
|
|
25
|
-
tryToAddWrongProp(propositions, "Rectiligne", "raw");
|
|
26
|
-
tryToAddWrongProp(propositions, "Circulaire", "raw");
|
|
27
|
-
tryToAddWrongProp(propositions, "Curviligne", "raw");
|
|
28
|
-
tryToAddWrongProp(propositions, "On ne peut pas savoir.", "raw");
|
|
29
|
-
return shuffleProps(propositions, n);
|
|
30
|
-
};
|
|
31
|
-
const generateExercise = () => {
|
|
32
|
-
const movementType = random(["Rectiligne", "Circulaire", "Curviligne"]);
|
|
33
|
-
const ggb = getGgb(movementType);
|
|
34
|
-
const instruction = `Soit le graphique ci-dessous, représentant la position d'un objet en fonction du temps. \n \\
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const instruction = `Soit le graphique ci-dessous, représentant la position d'un objet en fonction du temps.
|
|
9
|
+
|
|
35
10
|
Déterminer le type de mouvement de l'objet.`;
|
|
36
|
-
return
|
|
37
|
-
instruction,
|
|
38
|
-
answer: movementType,
|
|
39
|
-
movementType,
|
|
40
|
-
ggb: ggb.ggb,
|
|
41
|
-
coords: ggb.coords,
|
|
42
|
-
};
|
|
11
|
+
return instruction;
|
|
43
12
|
};
|
|
44
|
-
const
|
|
13
|
+
const getAnswer = (identifiers) => {
|
|
14
|
+
const { movementType } = identifiers;
|
|
15
|
+
return movementType;
|
|
16
|
+
};
|
|
17
|
+
const getGGBOptions = (identifiers) => {
|
|
18
|
+
const { movementType, a, b } = identifiers;
|
|
45
19
|
let commands = [];
|
|
46
20
|
let coords = [];
|
|
47
21
|
let point1;
|
|
48
22
|
let point2;
|
|
49
23
|
switch (movementType) {
|
|
50
24
|
case "Circulaire":
|
|
51
|
-
const a = randint(1, 5);
|
|
52
|
-
const b = randint(6, 9);
|
|
53
25
|
commands = [
|
|
54
26
|
`Semicircle((${a},4),(${b},8))`,
|
|
55
27
|
`Point({${a},4})`,
|
|
@@ -59,46 +31,74 @@ const getGgb = (movementType) => {
|
|
|
59
31
|
coords = [-2, 10, -2, 10];
|
|
60
32
|
break;
|
|
61
33
|
case "Rectiligne":
|
|
62
|
-
const affine =
|
|
34
|
+
const affine = new Affine(a, b);
|
|
63
35
|
point1 = `(2,${affine.calculate(2)})`;
|
|
64
36
|
point2 = `(8,${affine.calculate(8)})`;
|
|
65
|
-
commands = [`Segment(${point1},${point2})`]
|
|
37
|
+
commands = [`Segment(${point1},${point2})`];
|
|
38
|
+
for (let x = 3; x < 8; x++) {
|
|
39
|
+
commands.push(`Point({${x},${affine.calculate(x)}})`);
|
|
40
|
+
}
|
|
66
41
|
coords = [-2, 10, -2, affine.calculate(8) + 5];
|
|
67
42
|
break;
|
|
68
43
|
case "Curviligne":
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
44
|
+
commands = [`Function(e^sin(x)+${b},0,${a})`];
|
|
45
|
+
for (let x = 1; x < 9; x++) {
|
|
46
|
+
commands.push(`Point({${x},${Math.exp(Math.sin(x)) + b}})`);
|
|
47
|
+
}
|
|
72
48
|
coords = [-2, 10, -2, 10];
|
|
73
49
|
break;
|
|
74
50
|
}
|
|
75
|
-
|
|
76
|
-
|
|
51
|
+
const ggb = new GeogebraConstructor({ commands });
|
|
52
|
+
return ggb.getOptions({
|
|
77
53
|
coords,
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
57
|
+
const question = {
|
|
58
|
+
answer: getAnswer(identifiers),
|
|
59
|
+
instruction: getInstruction(identifiers),
|
|
60
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
61
|
+
keys: [],
|
|
62
|
+
answerFormat: "raw",
|
|
63
|
+
identifiers,
|
|
78
64
|
};
|
|
65
|
+
return question;
|
|
79
66
|
};
|
|
80
|
-
const
|
|
81
|
-
const
|
|
67
|
+
const getTypeOfMovementQuestion = () => {
|
|
68
|
+
const movementType = random(["Rectiligne", "Circulaire", "Curviligne"]);
|
|
69
|
+
let a, b;
|
|
82
70
|
switch (movementType) {
|
|
71
|
+
case "Circulaire":
|
|
72
|
+
a = randint(1, 5);
|
|
73
|
+
b = randint(6, 9);
|
|
74
|
+
break;
|
|
83
75
|
case "Rectiligne":
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
76
|
+
const affine = AffineConstructor.random({ min: 1, max: 4 }, { min: 1, max: 4 });
|
|
77
|
+
a = affine.a;
|
|
78
|
+
b = affine.b;
|
|
87
79
|
break;
|
|
88
80
|
case "Curviligne":
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
81
|
+
default:
|
|
82
|
+
a = randint(10, 21);
|
|
83
|
+
b = randint(1, 5);
|
|
92
84
|
break;
|
|
93
85
|
}
|
|
94
|
-
|
|
86
|
+
const identifiers = { movementType, a, b };
|
|
87
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
88
|
+
};
|
|
89
|
+
const getPropositions = (n, { answer }) => {
|
|
90
|
+
const propositions = [];
|
|
91
|
+
addValidProp(propositions, answer, "raw");
|
|
92
|
+
tryToAddWrongProp(propositions, "Rectiligne", "raw");
|
|
93
|
+
tryToAddWrongProp(propositions, "Circulaire", "raw");
|
|
94
|
+
tryToAddWrongProp(propositions, "Curviligne", "raw");
|
|
95
|
+
tryToAddWrongProp(propositions, "On ne peut pas savoir.", "raw");
|
|
96
|
+
return shuffleProps(propositions, n);
|
|
95
97
|
};
|
|
96
98
|
export const typeOfMovement = {
|
|
97
99
|
id: "typeOfMovement",
|
|
98
100
|
label: "Déterminer le type de mouvement",
|
|
99
|
-
levels: ["2nde"],
|
|
100
101
|
isSingleStep: true,
|
|
101
|
-
sections: ["Mécanique"],
|
|
102
102
|
generator: (nb) => getDistinctQuestions(getTypeOfMovementQuestion, nb),
|
|
103
103
|
qcmTimer: 60,
|
|
104
104
|
freeTimer: 60,
|
|
@@ -106,4 +106,5 @@ export const typeOfMovement = {
|
|
|
106
106
|
answerType: "QCU",
|
|
107
107
|
subject: "Physique",
|
|
108
108
|
hasGeogebra: true,
|
|
109
|
+
getQuestionFromIdentifiers,
|
|
109
110
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orderOfMagnitude.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/orderOfMagnitude.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"orderOfMagnitude.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/orderOfMagnitude.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAkEF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAYlD,CAAC"}
|
|
@@ -7,17 +7,35 @@ import { Measure } from "../../pc/measure/measure.js";
|
|
|
7
7
|
import { NumberNode } from "../../tree/nodes/numbers/numberNode.js";
|
|
8
8
|
import { PowerNode } from "../../tree/nodes/operators/powerNode.js";
|
|
9
9
|
const ten = new NumberNode(10);
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { order, multiplier } = identifiers;
|
|
12
|
+
const diameter = new Measure(multiplier, order, DistanceUnit.m);
|
|
13
|
+
const instruction = `Supposons qu'on ait un atome de diamètre $${diameter.toTex()}$. Indiquez l'ordre de grandeur du diamètre de cet atome.`;
|
|
14
|
+
return instruction;
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
const { order, multiplier } = identifiers;
|
|
18
|
+
const answer = multiplier > 5
|
|
19
|
+
? new PowerNode(ten, (order + 1).toTree())
|
|
20
|
+
: new PowerNode(ten, order.toTree());
|
|
21
|
+
return answer.toTex();
|
|
22
|
+
};
|
|
23
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
12
24
|
const question = {
|
|
13
|
-
answer:
|
|
14
|
-
instruction:
|
|
25
|
+
answer: getAnswer(identifiers),
|
|
26
|
+
instruction: getInstruction(identifiers),
|
|
15
27
|
keys: [],
|
|
16
28
|
answerFormat: "tex",
|
|
17
|
-
identifiers
|
|
29
|
+
identifiers,
|
|
18
30
|
};
|
|
19
31
|
return question;
|
|
20
32
|
};
|
|
33
|
+
const getOrderOfMagnitudeQuestion = () => {
|
|
34
|
+
const order = randint(-15, -10);
|
|
35
|
+
const multiplier = +randfloat(1, 11).toFixed(1);
|
|
36
|
+
const identifiers = { order: order, multiplier: multiplier };
|
|
37
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
38
|
+
};
|
|
21
39
|
const getPropositions = (n, { answer, order, multiplier }) => {
|
|
22
40
|
const propositions = [];
|
|
23
41
|
addValidProp(propositions, answer);
|
|
@@ -34,32 +52,15 @@ const generatePropositions = (order, multiplier) => {
|
|
|
34
52
|
const third = new PowerNode(ten, correctAnswer.toTree()).toTex();
|
|
35
53
|
return [first, second, third];
|
|
36
54
|
};
|
|
37
|
-
const generateExercise = () => {
|
|
38
|
-
const order = randint(-15, -10);
|
|
39
|
-
const multiplier = +randfloat(1, 11).toFixed(1);
|
|
40
|
-
const diameter = new Measure(multiplier, order, DistanceUnit.m);
|
|
41
|
-
const answer = multiplier > 5
|
|
42
|
-
? new PowerNode(ten, (order + 1).toTree())
|
|
43
|
-
: new PowerNode(ten, order.toTree());
|
|
44
|
-
const instruction = `Supposons qu'on ait un atome de diamètre $${diameter.toTex()}$. Indiquez l'ordre de grandeur du diamètre de cet atome.`;
|
|
45
|
-
return {
|
|
46
|
-
answer,
|
|
47
|
-
order,
|
|
48
|
-
diameter,
|
|
49
|
-
multiplier,
|
|
50
|
-
instruction,
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
55
|
export const orderOfMagnitude = {
|
|
54
56
|
id: "orderOfMagnitude",
|
|
55
57
|
label: "Calcul d'ordre de grandeur",
|
|
56
|
-
levels: ["2nde"],
|
|
57
58
|
isSingleStep: true,
|
|
58
|
-
sections: ["Chimie organique"],
|
|
59
59
|
generator: (nb) => getDistinctQuestions(getOrderOfMagnitudeQuestion, nb),
|
|
60
60
|
qcmTimer: 60,
|
|
61
61
|
freeTimer: 60,
|
|
62
62
|
getPropositions,
|
|
63
63
|
isAnswerValid,
|
|
64
|
+
getQuestionFromIdentifiers,
|
|
64
65
|
subject: "Chimie",
|
|
65
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pH.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/pH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"pH.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/pH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA2EF,eAAO,MAAM,EAAE,EAAE,QAAQ,CAAC,WAAW,CAapC,CAAC"}
|
package/lib/exercises/pc/pH.js
CHANGED
|
@@ -4,29 +4,51 @@ import { frenchify } from "../../math/utils/latex/frenchify.js";
|
|
|
4
4
|
import { randint } from "../../math/utils/random/randint.js";
|
|
5
5
|
import { round } from "../../math/utils/round.js";
|
|
6
6
|
import { shuffle } from "../../utils/alea/shuffle.js";
|
|
7
|
-
const
|
|
8
|
-
const randomNumber =
|
|
9
|
-
const
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const { randomNumber, randomTenPower } = identifiers;
|
|
9
|
+
const instruction = `Calculer le pH d'une solution ayant une concentration en ions hydrogène ($H^+$) de $${randomNumber} \\times 10^{-${randomTenPower}} \\ \\textrm{mol}/\\textrm{L}$.`;
|
|
10
|
+
return instruction;
|
|
11
|
+
};
|
|
12
|
+
const getAnswer = (identifiers) => {
|
|
13
|
+
const { randomNumber, randomTenPower } = identifiers;
|
|
10
14
|
const concentrationHydrogene = randomNumber * 10 ** -randomTenPower;
|
|
11
|
-
const instruction = `Calculer le pH d'une solution ayant une concentration en ions hydrogène ($H^+$) de $${randomNumber} \\times 10^{-${randomTenPower}}$ mol/L.`;
|
|
12
15
|
const answer = frenchify(round(-Math.log10(concentrationHydrogene), 1));
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
return answer;
|
|
17
|
+
};
|
|
18
|
+
const getHint = (identifiers) => {
|
|
19
|
+
const hint = "Utilise la formule du pH : $\\text{pH} = -\\log[H^+]$.";
|
|
20
|
+
return hint;
|
|
21
|
+
};
|
|
22
|
+
const getCorrection = (identifiers) => {
|
|
23
|
+
const { randomNumber, randomTenPower } = identifiers;
|
|
24
|
+
const correction = `Pour calculer le pH, on utilise la formule $\\textrm{pH} = -\\log[H^+]$.
|
|
25
|
+
|
|
26
|
+
La concentration en ions hydrogène est $${randomNumber} \\times 10^{-${randomTenPower}}\\ \\textrm{mol}/\\textrm{L}$.
|
|
27
|
+
|
|
28
|
+
En appliquant la formule, on obtient $\\textrm{pH} = -\\log(${randomNumber} \\times 10^{-${randomTenPower}})$.
|
|
29
|
+
|
|
30
|
+
Le résultat est $${getAnswer(identifiers)}$.`;
|
|
31
|
+
return correction;
|
|
32
|
+
};
|
|
33
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
18
34
|
const question = {
|
|
19
|
-
instruction,
|
|
35
|
+
instruction: getInstruction(identifiers),
|
|
20
36
|
startStatement: `pH`,
|
|
21
|
-
answer,
|
|
22
|
-
hint,
|
|
23
|
-
correction,
|
|
37
|
+
answer: getAnswer(identifiers),
|
|
38
|
+
hint: getHint(identifiers),
|
|
39
|
+
correction: getCorrection(identifiers),
|
|
24
40
|
keys: ["logBrackets"],
|
|
25
41
|
answerFormat: "tex",
|
|
26
|
-
identifiers
|
|
42
|
+
identifiers,
|
|
27
43
|
};
|
|
28
44
|
return question;
|
|
29
45
|
};
|
|
46
|
+
const getpH = () => {
|
|
47
|
+
const randomNumber = randint(1, 10);
|
|
48
|
+
const randomTenPower = randint(2, 10);
|
|
49
|
+
const identifiers = { randomNumber, randomTenPower };
|
|
50
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
51
|
+
};
|
|
30
52
|
const getPropositions = (n, { answer }) => {
|
|
31
53
|
const propositions = [];
|
|
32
54
|
addValidProp(propositions, answer);
|
|
@@ -46,8 +68,6 @@ export const pH = {
|
|
|
46
68
|
id: "pH",
|
|
47
69
|
connector: "=",
|
|
48
70
|
label: "Calculer le pH d'une solution",
|
|
49
|
-
levels: ["4ème", "3ème", "2nde"],
|
|
50
|
-
sections: ["Acide / Base"],
|
|
51
71
|
subject: "Chimie",
|
|
52
72
|
isSingleStep: true,
|
|
53
73
|
generator: (nb) => getDistinctQuestions(getpH, nb),
|
|
@@ -56,4 +76,5 @@ export const pH = {
|
|
|
56
76
|
getPropositions,
|
|
57
77
|
isAnswerValid,
|
|
58
78
|
hasHintAndCorrection: true,
|
|
79
|
+
getQuestionFromIdentifiers,
|
|
59
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perceivedFrequency.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/perceivedFrequency.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,
|
|
1
|
+
{"version":3,"file":"perceivedFrequency.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/perceivedFrequency.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,EAIT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAsEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAYpD,CAAC"}
|
|
@@ -6,24 +6,38 @@ import { round } from "../../math/utils/round.js";
|
|
|
6
6
|
import { shuffle } from "../../utils/alea/shuffle.js";
|
|
7
7
|
const soundSpeed = 340; // Vitesse du son dans l'air en m/s
|
|
8
8
|
const observerSpeed = 0; // La vitesse de l'observateur est supposée être nulle (observateur immobile)
|
|
9
|
-
const
|
|
10
|
-
const frequencyEmitted
|
|
11
|
-
|
|
9
|
+
const getInstruction = (identifiers) => {
|
|
10
|
+
const { frequencyEmitted, ambulanceSpeed } = identifiers;
|
|
11
|
+
return `Une ambulance émet un son d'une fréquence de $${frequencyEmitted}\\ \\textrm{Hz}$ lorsqu'elle
|
|
12
|
+
s'approche d'un observateur à une vitesse de $${ambulanceSpeed} \\ \\textrm{m}/\\textrm{s}$.
|
|
13
|
+
|
|
14
|
+
La vitesse du son dans l'air est de $340 \\ \\textrm{m}/\\textrm{s}$.
|
|
15
|
+
|
|
16
|
+
Calculer la fréquence perçue par l'observateur.`;
|
|
17
|
+
};
|
|
18
|
+
const getAnswer = (identifiers) => {
|
|
19
|
+
const { frequencyEmitted, ambulanceSpeed } = identifiers;
|
|
12
20
|
const perceivedFrequency = (frequencyEmitted * (soundSpeed + observerSpeed)) /
|
|
13
21
|
(soundSpeed - ambulanceSpeed);
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
const answer = `${frenchify(round(perceivedFrequency, 0))}\\text{Hz}`;
|
|
23
|
+
return answer;
|
|
24
|
+
};
|
|
25
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
18
26
|
const question = {
|
|
19
|
-
instruction,
|
|
20
|
-
answer,
|
|
27
|
+
instruction: getInstruction(identifiers),
|
|
28
|
+
answer: getAnswer(identifiers),
|
|
21
29
|
keys: ["Hz"],
|
|
22
30
|
answerFormat: "tex",
|
|
23
|
-
identifiers
|
|
31
|
+
identifiers,
|
|
24
32
|
};
|
|
25
33
|
return question;
|
|
26
34
|
};
|
|
35
|
+
const getPerceivedFrequency = () => {
|
|
36
|
+
const frequencyEmitted = randint(200, 1500); // Fréquence émise en Hz
|
|
37
|
+
const ambulanceSpeed = Math.floor(Math.random() * 40 + 10); // Vitesse de l'ambulance entre 10 et 50 m/s
|
|
38
|
+
const identifiers = { ambulanceSpeed, frequencyEmitted };
|
|
39
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
40
|
+
};
|
|
27
41
|
const getPropositions = (n, { answer, ambulanceSpeed, frequencyEmitted }) => {
|
|
28
42
|
const propositions = [];
|
|
29
43
|
addValidProp(propositions, answer);
|
|
@@ -31,7 +45,7 @@ const getPropositions = (n, { answer, ambulanceSpeed, frequencyEmitted }) => {
|
|
|
31
45
|
(soundSpeed - ambulanceSpeed);
|
|
32
46
|
while (propositions.length < n) {
|
|
33
47
|
tryToAddWrongProp(propositions, frenchify(round(perceivedFrequency * (0.3 + Math.random() * 1.5), 0)) +
|
|
34
|
-
" \\
|
|
48
|
+
" \\text{Hz}");
|
|
35
49
|
}
|
|
36
50
|
return shuffle(propositions);
|
|
37
51
|
};
|
|
@@ -42,8 +56,6 @@ export const perceivedFrequency = {
|
|
|
42
56
|
id: "perceivedFrequency",
|
|
43
57
|
connector: "\\iff",
|
|
44
58
|
label: "Calculer une fréquence perçue par un observateur",
|
|
45
|
-
levels: ["4ème", "3ème", "2nde"],
|
|
46
|
-
sections: ["Ondes"],
|
|
47
59
|
subject: "Physique",
|
|
48
60
|
isSingleStep: true,
|
|
49
61
|
generator: (nb) => getDistinctQuestions(getPerceivedFrequency, nb),
|
|
@@ -51,4 +63,5 @@ export const perceivedFrequency = {
|
|
|
51
63
|
freeTimer: 60,
|
|
52
64
|
getPropositions,
|
|
53
65
|
isAnswerValid,
|
|
66
|
+
getQuestionFromIdentifiers,
|
|
54
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"potentialEnergy.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/potentialEnergy.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,
|
|
1
|
+
{"version":3,"file":"potentialEnergy.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/potentialEnergy.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,EAIT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAuEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAYjD,CAAC"}
|
|
@@ -8,31 +8,44 @@ import { DistanceUnit } from "../../pc/units/distanceUnits.js";
|
|
|
8
8
|
import { EnergyUnit } from "../../pc/units/energyUnit.js";
|
|
9
9
|
import { MassUnit } from "../../pc/units/massUnits.js";
|
|
10
10
|
import { shuffle } from "../../utils/alea/shuffle.js";
|
|
11
|
-
const
|
|
12
|
-
const mass
|
|
11
|
+
const getInstruction = (identifiers) => {
|
|
12
|
+
const { mass, height } = identifiers;
|
|
13
13
|
const massMeasure = new Measure(mass, 0, MassUnit.kg);
|
|
14
|
-
const height = Math.floor(Math.random() * 50 + 1); // Hauteur par rapport à la référence entre 1 et 51 m
|
|
15
14
|
const heightMeasure = new Measure(height, 0, DistanceUnit.m);
|
|
16
|
-
const potentialEnergy = mass * 9.81 * height;
|
|
17
15
|
const instruction = `Un objet de masse $${massMeasure.toTex({
|
|
18
16
|
notScientific: true,
|
|
19
17
|
})}$ est suspendu à une hauteur de $${heightMeasure.toTex({
|
|
20
18
|
notScientific: true,
|
|
21
19
|
})}$. Il est ensuite relâché et tombe librement.
|
|
22
|
-
|
|
20
|
+
|
|
21
|
+
Calculer l'énergie potentielle de l'objet (on suppose que l'accélération due à la gravité est de $${earthGravityAcceleration.measure
|
|
23
22
|
.toSignificant(2)
|
|
24
|
-
.toTex()}$)
|
|
23
|
+
.toTex()}$).`;
|
|
24
|
+
return instruction;
|
|
25
|
+
};
|
|
26
|
+
const getAnswer = (identifiers) => {
|
|
27
|
+
const { mass, height } = identifiers;
|
|
28
|
+
const potentialEnergy = mass * 9.81 * height;
|
|
25
29
|
const answer = `${frenchify(round(potentialEnergy, 2))}${EnergyUnit.J.toTex()}`;
|
|
30
|
+
return answer;
|
|
31
|
+
};
|
|
32
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
26
33
|
const question = {
|
|
27
|
-
instruction,
|
|
34
|
+
instruction: getInstruction(identifiers),
|
|
28
35
|
startStatement: "Ep",
|
|
29
|
-
answer,
|
|
36
|
+
answer: getAnswer(identifiers),
|
|
30
37
|
keys: ["J"],
|
|
31
38
|
answerFormat: "tex",
|
|
32
|
-
identifiers
|
|
39
|
+
identifiers,
|
|
33
40
|
};
|
|
34
41
|
return question;
|
|
35
42
|
};
|
|
43
|
+
const getPotentialEnergy = () => {
|
|
44
|
+
const mass = Math.floor(Math.random() * 10 + 1); // Masse de l'objet entre 1 et 11 kg
|
|
45
|
+
const height = Math.floor(Math.random() * 50 + 1); // Hauteur par rapport à la référence entre 1 et 51 m
|
|
46
|
+
const identifiers = { height, mass };
|
|
47
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
48
|
+
};
|
|
36
49
|
const getPropositions = (n, { answer, height, mass }) => {
|
|
37
50
|
const propositions = [];
|
|
38
51
|
addValidProp(propositions, answer);
|
|
@@ -50,8 +63,6 @@ export const potentialEnergy = {
|
|
|
50
63
|
id: "potentialEnergy",
|
|
51
64
|
connector: "=",
|
|
52
65
|
label: "Calculer l'énergie potentielle",
|
|
53
|
-
levels: ["4ème", "3ème", "2nde"],
|
|
54
|
-
sections: ["Mécanique"],
|
|
55
66
|
subject: "Physique",
|
|
56
67
|
isSingleStep: true,
|
|
57
68
|
generator: (nb) => getDistinctQuestions(getPotentialEnergy, nb),
|
|
@@ -59,4 +70,5 @@ export const potentialEnergy = {
|
|
|
59
70
|
freeTimer: 60,
|
|
60
71
|
getPropositions,
|
|
61
72
|
isAnswerValid,
|
|
73
|
+
getQuestionFromIdentifiers,
|
|
62
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculatePowerOfLight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/power/calculatePowerOfLight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"calculatePowerOfLight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/power/calculatePowerOfLight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;CACb,CAAC;AA+GF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAavD,CAAC"}
|
|
@@ -8,29 +8,81 @@ import { PowerUnit } from "../../../pc/units/powerUnits.js";
|
|
|
8
8
|
import { WattUnit } from "../../../pc/units/wattUnit.js";
|
|
9
9
|
import { NumberNode } from "../../../tree/nodes/numbers/numberNode.js";
|
|
10
10
|
const two = new NumberNode(2);
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const getInstruction = (identifiers) => {
|
|
12
|
+
const { E, S } = identifiers;
|
|
13
|
+
const EMeasure = new Measure(E[0], E[1]);
|
|
14
|
+
const SMeasure = new Measure(S[0], S[1]);
|
|
15
|
+
const instruction = `Une cellule photovoltaïque est exposée à une lumière dont l'éclairement $E$ est de $${EMeasure.toTex({ notScientific: true })}$.
|
|
16
|
+
|
|
17
|
+
La surface utile $S$ de cette cellule est de $${SMeasure.toTex({
|
|
18
|
+
notScientific: true,
|
|
19
|
+
})}$.
|
|
20
|
+
|
|
21
|
+
Calculez la puissance lumineuse reçue par la cellule photovoltaïque.`;
|
|
22
|
+
return instruction;
|
|
23
|
+
};
|
|
24
|
+
const getAnswer = (identifiers) => {
|
|
25
|
+
const { E, S } = identifiers;
|
|
26
|
+
const EMeasure = new Measure(E[0], E[1]);
|
|
27
|
+
const SMeasure = new Measure(S[0], S[1]);
|
|
28
|
+
const lightPower = EMeasure.times(SMeasure).toSignificant(2);
|
|
29
|
+
return lightPower.toTex({ hideUnit: true, notScientific: true });
|
|
30
|
+
};
|
|
31
|
+
const getHint = (identifiers) => {
|
|
32
|
+
const hint = `La puissance lumineuse reçue $P$, exprimée en $${WattUnit.W.toTex()}$, est donnée par la formule :
|
|
33
|
+
|
|
34
|
+
$$
|
|
35
|
+
P=E \\cdot S
|
|
36
|
+
$$
|
|
37
|
+
`;
|
|
38
|
+
return hint;
|
|
39
|
+
};
|
|
40
|
+
const getCorrection = (identifiers) => {
|
|
41
|
+
const { E, S } = identifiers;
|
|
42
|
+
const EMeasure = new Measure(E[0], E[1]);
|
|
43
|
+
const SMeasure = new Measure(S[0], S[1]);
|
|
44
|
+
const lightPower = EMeasure.times(SMeasure).toSignificant(2);
|
|
45
|
+
const correction = `En appliquant la formule $P=E \\cdot S$ on obtient :
|
|
46
|
+
|
|
47
|
+
$$
|
|
48
|
+
P=${EMeasure.toTex({ notScientific: true })} \\times ${SMeasure.toTex({
|
|
49
|
+
notScientific: true,
|
|
50
|
+
})}\\ \\Rightarrow P=${lightPower.toTex({ notScientific: true })}
|
|
51
|
+
$$`;
|
|
52
|
+
return correction;
|
|
53
|
+
};
|
|
54
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
13
55
|
const question = {
|
|
14
|
-
answer:
|
|
15
|
-
instruction:
|
|
56
|
+
answer: getAnswer(identifiers),
|
|
57
|
+
instruction: getInstruction(identifiers),
|
|
16
58
|
keys: [],
|
|
17
|
-
hint:
|
|
18
|
-
correction:
|
|
59
|
+
hint: getHint(identifiers),
|
|
60
|
+
correction: getCorrection(identifiers),
|
|
19
61
|
answerFormat: "tex",
|
|
20
|
-
identifiers
|
|
21
|
-
E: exo.E.significantPart * Math.pow(10, exo.E.exponent),
|
|
22
|
-
S: exo.S.significantPart * Math.pow(10, exo.S.exponent),
|
|
23
|
-
},
|
|
62
|
+
identifiers,
|
|
24
63
|
};
|
|
25
64
|
return question;
|
|
26
65
|
};
|
|
66
|
+
const getCalculatePowerOfLightQuestion = () => {
|
|
67
|
+
const E = new Measure(randint(10, 30), 0, new DivideUnit(WattUnit.W, new PowerUnit(DistanceUnit.m, two)));
|
|
68
|
+
const S = new Measure(randint(3, 11), 0, new PowerUnit(DistanceUnit.m, two));
|
|
69
|
+
const identifiers = {
|
|
70
|
+
E: [E.significantPart, E.exponent],
|
|
71
|
+
S: [S.significantPart, S.exponent],
|
|
72
|
+
};
|
|
73
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
74
|
+
};
|
|
27
75
|
const getPropositions = (n, { answer, E, S }) => {
|
|
28
76
|
const propositions = [];
|
|
29
77
|
addValidProp(propositions, answer + `\\ ${WattUnit.W.toTex()}`);
|
|
30
|
-
|
|
78
|
+
const EMeasure = new Measure(E[0], E[1]);
|
|
79
|
+
const SMeasure = new Measure(S[0], S[1]);
|
|
80
|
+
const Eev = EMeasure.getValueAsNumber();
|
|
81
|
+
const Sev = SMeasure.getValueAsNumber();
|
|
82
|
+
generatePropositions(Eev, Sev).forEach((value) => tryToAddWrongProp(propositions, value.toTex({ notScientific: true })));
|
|
31
83
|
let random;
|
|
32
84
|
while (propositions.length < n) {
|
|
33
|
-
random = randint(
|
|
85
|
+
random = randint(Eev * Sev - 10, Eev * Sev + 10, [Eev]);
|
|
34
86
|
tryToAddWrongProp(propositions, new Measure(random, 0, WattUnit.W).toTex({ notScientific: true }));
|
|
35
87
|
}
|
|
36
88
|
return shuffleProps(propositions, n);
|
|
@@ -42,37 +94,10 @@ const generatePropositions = (E, S) => {
|
|
|
42
94
|
const first = new Measure(Math.floor(E / S), 0, WattUnit.W);
|
|
43
95
|
return [first];
|
|
44
96
|
};
|
|
45
|
-
const getExercise = () => {
|
|
46
|
-
const E = new Measure(randint(10, 30), 0, new DivideUnit(WattUnit.W, new PowerUnit(DistanceUnit.m, two)));
|
|
47
|
-
const S = new Measure(randint(3, 11), 0, new PowerUnit(DistanceUnit.m, two));
|
|
48
|
-
const lightPower = E.times(S).toSignificant(2);
|
|
49
|
-
const instruction = `Une cellule photovoltaïque est exposée à une lumière dont l'éclairement $E$ est de $${E.toTex({ notScientific: true })}$.\n \\
|
|
50
|
-
La surface utile $S$ de cette cellule est de $${S.toTex({
|
|
51
|
-
notScientific: true,
|
|
52
|
-
})}$. Calculez la puissance lumineuse reçue par la cellule photovoltaïque. $${lightPower.toTex({ notScientific: true })}$`;
|
|
53
|
-
const hint = `Rappel : La puissance lumineuse reçue $P$, exprimée en $${WattUnit.W.toTex()}$, est donnée par la formule :
|
|
54
|
-
- $P=E \\cdot S$
|
|
55
|
-
`;
|
|
56
|
-
const correction = `En appliquant la formule $P=E \\cdot S$ on obtient :
|
|
57
|
-
- $P=${E.toTex({ notScientific: true })} \\times ${S.toTex({
|
|
58
|
-
notScientific: true,
|
|
59
|
-
})}\\ \\Rightarrow P=${lightPower.toTex({ notScientific: true })}$`;
|
|
60
|
-
return {
|
|
61
|
-
instruction,
|
|
62
|
-
answer: lightPower.toTex({ hideUnit: true, notScientific: true }),
|
|
63
|
-
hint,
|
|
64
|
-
correction,
|
|
65
|
-
E,
|
|
66
|
-
S,
|
|
67
|
-
lightPower,
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
97
|
export const calculatePowerOfLight = {
|
|
71
98
|
id: "calculatePowerOfLight",
|
|
72
99
|
label: "Calcul de puissance lumineuse.",
|
|
73
|
-
levels: ["1reSpé"],
|
|
74
100
|
isSingleStep: true,
|
|
75
|
-
sections: ["Lumière"],
|
|
76
101
|
generator: (nb) => getDistinctQuestions(getCalculatePowerOfLightQuestion, nb),
|
|
77
102
|
qcmTimer: 60,
|
|
78
103
|
freeTimer: 60,
|
|
@@ -80,4 +105,5 @@ export const calculatePowerOfLight = {
|
|
|
80
105
|
isAnswerValid,
|
|
81
106
|
subject: "Physique",
|
|
82
107
|
hasHintAndCorrection: true,
|
|
108
|
+
getQuestionFromIdentifiers,
|
|
83
109
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Exercise } from "../../exercises/exercise.js";
|
|
2
2
|
type Identifiers = {
|
|
3
|
-
|
|
3
|
+
isAsking: string;
|
|
4
|
+
enetringLightX: number;
|
|
5
|
+
enetringLightY: number;
|
|
4
6
|
};
|
|
5
7
|
export declare const recognizeRefractionOrReflectionAngles: Exercise<Identifiers>;
|
|
6
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recognizeRefractionOrReflectionAngles.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/recognizeRefractionOrReflectionAngles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"recognizeRefractionOrReflectionAngles.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/recognizeRefractionOrReflectionAngles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAkHF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAavE,CAAC"}
|