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
|
@@ -14,39 +14,32 @@ const questionAngle = [
|
|
|
14
14
|
IsAsking.IncidenceAngle,
|
|
15
15
|
IsAsking.RefractionAngle,
|
|
16
16
|
];
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const question = {
|
|
20
|
-
answer: exo.isAsking,
|
|
21
|
-
instruction: `Un rayon arrive sur la surface de séparation entre deux milieux. Comment appelle-t-on l'angle représenté ci-dessous ?`,
|
|
22
|
-
keys: [],
|
|
23
|
-
ggbOptions: exo.ggb.getOptions({
|
|
24
|
-
coords: exo.coords,
|
|
25
|
-
}),
|
|
26
|
-
answerFormat: "raw",
|
|
27
|
-
identifiers: { commands: exo.commands },
|
|
28
|
-
};
|
|
29
|
-
return question;
|
|
17
|
+
const getInstruction = (identifiers) => {
|
|
18
|
+
return `Un rayon arrive sur la surface de séparation entre deux milieux. Comment appelle-t-on l'angle représenté ci-dessous ?`;
|
|
30
19
|
};
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
tryToAddWrongProp(propositions, "Angle d'incidence", "raw");
|
|
35
|
-
tryToAddWrongProp(propositions, "Angle de réfraction", "raw");
|
|
36
|
-
tryToAddWrongProp(propositions, "Angle de réflexion", "raw");
|
|
37
|
-
return shuffleProps(propositions, n);
|
|
20
|
+
const getAnswer = (identifiers) => {
|
|
21
|
+
const { isAsking } = identifiers;
|
|
22
|
+
return isAsking;
|
|
38
23
|
};
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
|
|
24
|
+
const getGGBOptions = (identifiers) => {
|
|
25
|
+
const { isAsking, enetringLightX, enetringLightY } = identifiers;
|
|
26
|
+
let angle = "";
|
|
27
|
+
switch (isAsking) {
|
|
28
|
+
case IsAsking.RefractionAngle:
|
|
29
|
+
angle = `Ang = Angle(Vector((0,0), (0,-5)),I)`;
|
|
30
|
+
case IsAsking.ReflectionAngle:
|
|
31
|
+
angle = `Ang = Angle(R,Vector((0,0), (0,5)))`;
|
|
32
|
+
case IsAsking.IncidenceAngle:
|
|
33
|
+
default:
|
|
34
|
+
angle = `Ang = Angle(Line((0,0), (0,5)),Line((0,0),(${enetringLightX},${enetringLightY})))`;
|
|
35
|
+
}
|
|
36
|
+
const reflectionLight = { x2: -enetringLightX, y2: enetringLightY };
|
|
42
37
|
const refractingLight = {
|
|
43
38
|
x2: reflectionLight.x2 - randint(5, 10),
|
|
44
39
|
y2: -reflectionLight.y2,
|
|
45
40
|
};
|
|
46
|
-
const isAsking = random(questionAngle);
|
|
47
|
-
const angle = getAngle(isAsking, enetringLight);
|
|
48
41
|
const commands = [
|
|
49
|
-
`E = Vector((${
|
|
42
|
+
`E = Vector((${enetringLightX},${enetringLightY}), (0,0))`,
|
|
50
43
|
`R = Vector((0,0), (${reflectionLight.x2},${reflectionLight.y2}))`,
|
|
51
44
|
`I = Vector((0,0), (${refractingLight.x2},${refractingLight.y2}))`,
|
|
52
45
|
angle,
|
|
@@ -55,7 +48,7 @@ const generateExercise = () => {
|
|
|
55
48
|
`Text("\\tiny \\text{Surface de séparation}", (-12,0),false,true)`,
|
|
56
49
|
`Text("\\tiny \\text{Milieu 1}", (9,2.5),false,true)`,
|
|
57
50
|
`Text("\\tiny \\text{Milieu 2}", (9,0),false,true)`,
|
|
58
|
-
`YText = Text(RotateText("\\tiny \\text{Rayon incident}",-90°+${
|
|
51
|
+
`YText = Text(RotateText("\\tiny \\text{Rayon incident}",-90°+${angle}), (${enetringLightX / 2 - 1.5},${enetringLightY / 2}),false,true)`,
|
|
59
52
|
`SetLineStyle(DashedLine,2)`,
|
|
60
53
|
`ShowLabel(Ang,false)`,
|
|
61
54
|
`SetColor(E,"#F78D04")`,
|
|
@@ -79,33 +72,40 @@ const generateExercise = () => {
|
|
|
79
72
|
hideAxes: true,
|
|
80
73
|
});
|
|
81
74
|
const coords = [-10, 10, -10, 10];
|
|
82
|
-
return {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
75
|
+
return ggb.getOptions({
|
|
76
|
+
coords: coords,
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
80
|
+
const question = {
|
|
81
|
+
answer: getAnswer(identifiers),
|
|
82
|
+
instruction: getInstruction(identifiers),
|
|
83
|
+
keys: [],
|
|
84
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
85
|
+
answerFormat: "raw",
|
|
86
|
+
identifiers,
|
|
89
87
|
};
|
|
88
|
+
return question;
|
|
90
89
|
};
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
90
|
+
const getRecognizeRefractionOrReflectionAnglesQuestion = () => {
|
|
91
|
+
const enetringLightX = randint(-20, -10);
|
|
92
|
+
const enetringLightY = randint(15, 21);
|
|
93
|
+
const isAsking = random(questionAngle);
|
|
94
|
+
const identifiers = { isAsking, enetringLightX, enetringLightY };
|
|
95
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
96
|
+
};
|
|
97
|
+
const getPropositions = (n, { answer }) => {
|
|
98
|
+
const propositions = [];
|
|
99
|
+
addValidProp(propositions, answer, "raw");
|
|
100
|
+
tryToAddWrongProp(propositions, "Angle d'incidence", "raw");
|
|
101
|
+
tryToAddWrongProp(propositions, "Angle de réfraction", "raw");
|
|
102
|
+
tryToAddWrongProp(propositions, "Angle de réflexion", "raw");
|
|
103
|
+
return shuffleProps(propositions, n);
|
|
102
104
|
};
|
|
103
105
|
export const recognizeRefractionOrReflectionAngles = {
|
|
104
106
|
id: "recognizeRefractionOrReflectionAngles",
|
|
105
107
|
label: "Reconaitre un anlge de reflexion, de refraction ou d'incidence",
|
|
106
|
-
levels: ["2nde"],
|
|
107
108
|
isSingleStep: true,
|
|
108
|
-
sections: ["Lumière"],
|
|
109
109
|
generator: (nb) => getDistinctQuestions(getRecognizeRefractionOrReflectionAnglesQuestion, nb),
|
|
110
110
|
qcmTimer: 60,
|
|
111
111
|
freeTimer: 60,
|
|
@@ -113,4 +113,5 @@ export const recognizeRefractionOrReflectionAngles = {
|
|
|
113
113
|
answerType: "QCU",
|
|
114
114
|
subject: "Physique",
|
|
115
115
|
hasGeogebra: true,
|
|
116
|
+
getQuestionFromIdentifiers,
|
|
116
117
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snellDescartes.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/snellDescartes.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,
|
|
1
|
+
{"version":3,"file":"snellDescartes.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/snellDescartes.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,EAMT,MAAM,6BAA6B,CAAC;AA2DrC,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC;AAuEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -56,30 +56,49 @@ const refractionIndex = [
|
|
|
56
56
|
n: 2.417,
|
|
57
57
|
},
|
|
58
58
|
];
|
|
59
|
-
const
|
|
60
|
-
const randomMaterial1
|
|
61
|
-
const randomMaterial2 = randint(randomMaterial1 + 1, refractionIndex.length);
|
|
59
|
+
const getInstruction = (identifiers) => {
|
|
60
|
+
const { randomMaterial1, randomMaterial2, ramdonAngleIncidenceDeg } = identifiers;
|
|
62
61
|
const n1 = refractionIndex[randomMaterial1].n;
|
|
63
62
|
const n2 = refractionIndex[randomMaterial2].n;
|
|
64
|
-
const ramdonAngleIncidenceDeg = randint(10, 90);
|
|
65
63
|
const instruction = `Un rayon de lumière se propage dans ${refractionIndex[randomMaterial1].Material} ($n1 \\approx ${n1}$) et atteint une surface ${refractionIndex[randomMaterial2].Material2}
|
|
66
|
-
($n2 \\approx ${n2}$) sous un angle d'incidence de $${ramdonAngleIncidenceDeg}$ degrés.
|
|
67
|
-
|
|
64
|
+
($n2 \\approx ${n2}$) sous un angle d'incidence de $${ramdonAngleIncidenceDeg}$ degrés.
|
|
65
|
+
|
|
66
|
+
Calculer l'angle de réfraction de la lumière à l'intérieur ${refractionIndex[randomMaterial2].Material3} en utilisant la loi de Snell-Descartes.`;
|
|
67
|
+
return instruction;
|
|
68
|
+
};
|
|
69
|
+
const getAnswer = (identifiers) => {
|
|
70
|
+
const { randomMaterial1, randomMaterial2, ramdonAngleIncidenceDeg } = identifiers;
|
|
71
|
+
const n1 = refractionIndex[randomMaterial1].n;
|
|
72
|
+
const n2 = refractionIndex[randomMaterial2].n;
|
|
68
73
|
const angleIncidenceRad = (ramdonAngleIncidenceDeg * Math.PI) / 180;
|
|
69
|
-
// Calculer l'angle de réfraction en radians
|
|
70
74
|
const angleRefractionRad = Math.asin((n1 / n2) * Math.sin(angleIncidenceRad));
|
|
71
|
-
// Convertir l'angle de réfraction de radians à degrés
|
|
72
75
|
const angleRefractionDeg = (angleRefractionRad * 180) / Math.PI;
|
|
73
76
|
const answer = `${frenchify(round(angleRefractionDeg, 1))}^{\\circ}`;
|
|
77
|
+
return answer;
|
|
78
|
+
};
|
|
79
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
74
80
|
const question = {
|
|
75
|
-
instruction,
|
|
76
|
-
answer,
|
|
81
|
+
instruction: getInstruction(identifiers),
|
|
82
|
+
answer: getAnswer(identifiers),
|
|
77
83
|
keys: ["sin", "arcsin", "degree"],
|
|
78
84
|
answerFormat: "tex",
|
|
79
|
-
identifiers
|
|
85
|
+
identifiers,
|
|
80
86
|
};
|
|
81
87
|
return question;
|
|
82
88
|
};
|
|
89
|
+
const getSnellDescartes = () => {
|
|
90
|
+
const randomMaterial1 = randint(0, refractionIndex.length - 1);
|
|
91
|
+
const randomMaterial2 = randint(randomMaterial1 + 1, refractionIndex.length);
|
|
92
|
+
const ramdonAngleIncidenceDeg = randint(10, 90);
|
|
93
|
+
// Calculer l'angle de réfraction en radians
|
|
94
|
+
// Convertir l'angle de réfraction de radians à degrés
|
|
95
|
+
const identifiers = {
|
|
96
|
+
ramdonAngleIncidenceDeg,
|
|
97
|
+
randomMaterial1,
|
|
98
|
+
randomMaterial2,
|
|
99
|
+
};
|
|
100
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
101
|
+
};
|
|
83
102
|
const getPropositions = (n, { answer }) => {
|
|
84
103
|
const propositions = [];
|
|
85
104
|
addValidProp(propositions, answer);
|
|
@@ -95,8 +114,6 @@ export const snellDescartes = {
|
|
|
95
114
|
id: "snellDescartes",
|
|
96
115
|
connector: "\\iff",
|
|
97
116
|
label: "Utiliser la loi de Snell-Descartes pour calculer un angle de réfraction",
|
|
98
|
-
levels: ["4ème", "3ème", "2nde"],
|
|
99
|
-
sections: ["Lumière"],
|
|
100
117
|
subject: "Physique",
|
|
101
118
|
isSingleStep: true,
|
|
102
119
|
generator: (nb) => getDistinctQuestions(getSnellDescartes, nb),
|
|
@@ -104,4 +121,5 @@ export const snellDescartes = {
|
|
|
104
121
|
freeTimer: 60,
|
|
105
122
|
getPropositions,
|
|
106
123
|
isAnswerValid,
|
|
124
|
+
getQuestionFromIdentifiers,
|
|
107
125
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findPeriodFromGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findPeriodFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"findPeriodFromGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findPeriodFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;CAC1B,CAAC;AA0FF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}
|
|
@@ -5,24 +5,17 @@ import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
|
|
|
5
5
|
import { randfloat } from "../../../math/utils/random/randfloat.js";
|
|
6
6
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
7
7
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
splinePoints.push([half, yStart]);
|
|
20
|
-
const threeQuarter = (3 * period) / 4;
|
|
21
|
-
splinePoints.push([
|
|
22
|
-
threeQuarter,
|
|
23
|
-
yStart + (isFirstNegative ? randfloat(2, 5) : randfloat(-2, -5)),
|
|
24
|
-
]);
|
|
25
|
-
splinePoints.push([period, yStart]);
|
|
8
|
+
const getInstruction = (identifiers) => {
|
|
9
|
+
return `L'enregistrement d'un signal sonore est donnée ci-dessous.
|
|
10
|
+
|
|
11
|
+
Déterminer la période de ce signal.`;
|
|
12
|
+
};
|
|
13
|
+
const getAnswer = (identifiers) => {
|
|
14
|
+
const { period } = identifiers;
|
|
15
|
+
return period.frenchify();
|
|
16
|
+
};
|
|
17
|
+
const getGGBOptions = (identifiers) => {
|
|
18
|
+
const { period, splinePoints } = identifiers;
|
|
26
19
|
const color = randomColor();
|
|
27
20
|
const commands = [
|
|
28
21
|
`S =Spline(${splinePoints
|
|
@@ -40,18 +33,42 @@ const getFindPeriodFromGraphQuestion = () => {
|
|
|
40
33
|
yAxis: { label: "$\\tiny Tension (V)$" },
|
|
41
34
|
isGridSimple: true,
|
|
42
35
|
});
|
|
36
|
+
return ggb.getOptions({
|
|
37
|
+
coords: [0, 20, -8, 8],
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
43
41
|
const question = {
|
|
44
|
-
answer:
|
|
45
|
-
instruction:
|
|
42
|
+
answer: getAnswer(identifiers),
|
|
43
|
+
instruction: getInstruction(identifiers),
|
|
46
44
|
keys: [],
|
|
47
45
|
answerFormat: "tex",
|
|
48
|
-
identifiers
|
|
49
|
-
ggbOptions:
|
|
50
|
-
coords: [0, 20, -8, 8],
|
|
51
|
-
}),
|
|
46
|
+
identifiers,
|
|
47
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
52
48
|
};
|
|
53
49
|
return question;
|
|
54
50
|
};
|
|
51
|
+
const getFindPeriodFromGraphQuestion = () => {
|
|
52
|
+
const period = randint(2, 5);
|
|
53
|
+
const yStart = randint(0, 4);
|
|
54
|
+
const splinePoints = [[0, yStart]];
|
|
55
|
+
const isFirstNegative = coinFlip();
|
|
56
|
+
const quarter = period / 4;
|
|
57
|
+
splinePoints.push([
|
|
58
|
+
quarter,
|
|
59
|
+
yStart + (isFirstNegative ? randfloat(-2, -5) : randfloat(2, 5)),
|
|
60
|
+
]);
|
|
61
|
+
const half = period / 2;
|
|
62
|
+
splinePoints.push([half, yStart]);
|
|
63
|
+
const threeQuarter = (3 * period) / 4;
|
|
64
|
+
splinePoints.push([
|
|
65
|
+
threeQuarter,
|
|
66
|
+
yStart + (isFirstNegative ? randfloat(2, 5) : randfloat(-2, -5)),
|
|
67
|
+
]);
|
|
68
|
+
splinePoints.push([period, yStart]);
|
|
69
|
+
const identifiers = { period, splinePoints };
|
|
70
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
71
|
+
};
|
|
55
72
|
const getPropositions = (n, { answer, period }) => {
|
|
56
73
|
const propositions = [];
|
|
57
74
|
addValidProp(propositions, answer);
|
|
@@ -66,9 +83,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
66
83
|
export const findPeriodFromGraph = {
|
|
67
84
|
id: "findPeriodFromGraph",
|
|
68
85
|
label: "Lire la période d'un signal sonore",
|
|
69
|
-
levels: ["2nde"],
|
|
70
86
|
isSingleStep: true,
|
|
71
|
-
sections: ["Son"],
|
|
72
87
|
generator: (nb) => getDistinctQuestions(getFindPeriodFromGraphQuestion, nb),
|
|
73
88
|
qcmTimer: 60,
|
|
74
89
|
freeTimer: 60,
|
|
@@ -76,4 +91,5 @@ export const findPeriodFromGraph = {
|
|
|
76
91
|
isAnswerValid,
|
|
77
92
|
subject: "Physique",
|
|
78
93
|
hasGeogebra: true,
|
|
94
|
+
getQuestionFromIdentifiers,
|
|
79
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findPeriodOrFrequencyFromGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findPeriodOrFrequencyFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"findPeriodOrFrequencyFromGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findPeriodOrFrequencyFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB,QAAQ,EAAE,SAAS,GAAG,WAAW,CAAC;CACnC,CAAC;AAkHF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
|
|
@@ -6,24 +6,22 @@ import { randfloat } from "../../../math/utils/random/randfloat.js";
|
|
|
6
6
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
7
7
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
8
8
|
import { isInt } from "../../../utils/isInt.js";
|
|
9
|
-
const
|
|
10
|
-
const period =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
]);
|
|
26
|
-
splinePoints.push([period, yStart]);
|
|
9
|
+
const getInstruction = (identifiers) => {
|
|
10
|
+
const { period, frequency, isAsking } = identifiers;
|
|
11
|
+
return `L'enregistrement d'un signal sonore est donnée ci-dessous.
|
|
12
|
+
|
|
13
|
+
Déterminer la ${isAsking} de ce signal.`;
|
|
14
|
+
};
|
|
15
|
+
const getAnswer = (identifiers) => {
|
|
16
|
+
const { period, frequency, isAsking } = identifiers;
|
|
17
|
+
const scientificFrequence = isInt(frequency)
|
|
18
|
+
? (1 / (period * Math.pow(10, -3))).toScientific(0).toTex()
|
|
19
|
+
: (1 / (period * Math.pow(10, -3))).toScientific(2).toTex();
|
|
20
|
+
const answer = isAsking === "période" ? period + "" : scientificFrequence;
|
|
21
|
+
return answer;
|
|
22
|
+
};
|
|
23
|
+
const getGGBOptions = (identifiers) => {
|
|
24
|
+
const { period, frequency, splinePoints } = identifiers;
|
|
27
25
|
const color = randomColor();
|
|
28
26
|
const commands = [
|
|
29
27
|
`S =Spline(${splinePoints
|
|
@@ -40,24 +38,46 @@ const getFindPeriodOrFrequencyFromGraphQuestion = () => {
|
|
|
40
38
|
xAxis: { label: "$\\tiny Temps (ms)$" },
|
|
41
39
|
yAxis: { label: "$\\tiny Tension (V)$" },
|
|
42
40
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const answer = isAsking === "période" ? period + "" : scientificFrequence;
|
|
41
|
+
return ggb.getOptions({
|
|
42
|
+
coords: [0, 20, -8, 8],
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
49
46
|
const question = {
|
|
50
|
-
answer:
|
|
51
|
-
instruction:
|
|
47
|
+
answer: getAnswer(identifiers),
|
|
48
|
+
instruction: getInstruction(identifiers),
|
|
52
49
|
keys: [],
|
|
53
50
|
answerFormat: "tex",
|
|
54
|
-
identifiers
|
|
55
|
-
ggbOptions:
|
|
56
|
-
coords: [0, 20, -8, 8],
|
|
57
|
-
}),
|
|
51
|
+
identifiers,
|
|
52
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
58
53
|
};
|
|
59
54
|
return question;
|
|
60
55
|
};
|
|
56
|
+
const getFindPeriodOrFrequencyFromGraphQuestion = () => {
|
|
57
|
+
const period = randint(2, 5);
|
|
58
|
+
const yStart = randint(0, 4);
|
|
59
|
+
const splinePoints = [[0, yStart]];
|
|
60
|
+
const isFirstNegative = coinFlip();
|
|
61
|
+
const quarter = period / 4;
|
|
62
|
+
splinePoints.push([
|
|
63
|
+
quarter,
|
|
64
|
+
yStart + (isFirstNegative ? randfloat(-2, -5) : randfloat(2, 5)),
|
|
65
|
+
]);
|
|
66
|
+
const half = period / 2;
|
|
67
|
+
splinePoints.push([half, yStart]);
|
|
68
|
+
const threeQuarter = (3 * period) / 4;
|
|
69
|
+
splinePoints.push([
|
|
70
|
+
threeQuarter,
|
|
71
|
+
yStart + (isFirstNegative ? randfloat(2, 5) : randfloat(-2, -5)),
|
|
72
|
+
]);
|
|
73
|
+
splinePoints.push([period, yStart]);
|
|
74
|
+
const isAsking = coinFlip()
|
|
75
|
+
? `période`
|
|
76
|
+
: `fréquence`;
|
|
77
|
+
const frequency = (1 / period) * 1000;
|
|
78
|
+
const identifiers = { period, frequency, splinePoints, isAsking };
|
|
79
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
80
|
+
};
|
|
61
81
|
const getPropositions = (n, { answer, period }) => {
|
|
62
82
|
const propositions = [];
|
|
63
83
|
const correctFrequency = 1 / (period * Math.pow(10, -3));
|
|
@@ -80,9 +100,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
80
100
|
export const findPeriodOrFrequencyFromGraph = {
|
|
81
101
|
id: "findPeriodOrFrequencyFromGraph",
|
|
82
102
|
label: "Lire la période ou la fréquence d'un signal sonore",
|
|
83
|
-
levels: ["2nde"],
|
|
84
103
|
isSingleStep: true,
|
|
85
|
-
sections: ["Son"],
|
|
86
104
|
generator: (nb) => getDistinctQuestions(getFindPeriodOrFrequencyFromGraphQuestion, nb),
|
|
87
105
|
qcmTimer: 60,
|
|
88
106
|
freeTimer: 60,
|
|
@@ -90,4 +108,5 @@ export const findPeriodOrFrequencyFromGraph = {
|
|
|
90
108
|
isAnswerValid,
|
|
91
109
|
subject: "Physique",
|
|
92
110
|
hasGeogebra: true,
|
|
111
|
+
getQuestionFromIdentifiers,
|
|
93
112
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findSoundFrequencyFromPeriod.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findSoundFrequencyFromPeriod.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"findSoundFrequencyFromPeriod.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findSoundFrequencyFromPeriod.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA4DF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAY9D,CAAC"}
|
|
@@ -3,19 +3,33 @@ import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuesti
|
|
|
3
3
|
import { randfloat } from "../../../math/utils/random/randfloat.js";
|
|
4
4
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
5
|
import { round } from "../../../math/utils/round.js";
|
|
6
|
-
const
|
|
7
|
-
const period =
|
|
6
|
+
const getInstruction = (identifiers) => {
|
|
7
|
+
const { period } = identifiers;
|
|
8
|
+
return `Un signal sonore a une période de $${period.frenchify()}\\ \\textrm{ms}$.
|
|
9
|
+
|
|
10
|
+
Calculer la fréquence de ce signal en $\\textrm{Hz}$ (arrondir à l'unité).`;
|
|
11
|
+
};
|
|
12
|
+
const getAnswer = (identifiers) => {
|
|
13
|
+
const { period } = identifiers;
|
|
8
14
|
const periodInSeconds = period / 1000;
|
|
9
15
|
const answer = `${round(1 / periodInSeconds, 0)}`;
|
|
16
|
+
return answer;
|
|
17
|
+
};
|
|
18
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
10
19
|
const question = {
|
|
11
|
-
answer,
|
|
12
|
-
instruction:
|
|
20
|
+
answer: getAnswer(identifiers),
|
|
21
|
+
instruction: getInstruction(identifiers),
|
|
13
22
|
keys: [],
|
|
14
23
|
answerFormat: "tex",
|
|
15
|
-
identifiers
|
|
24
|
+
identifiers,
|
|
16
25
|
};
|
|
17
26
|
return question;
|
|
18
27
|
};
|
|
28
|
+
const getFindSoundFrequencyFromPeriodQuestion = () => {
|
|
29
|
+
const period = round(randfloat(1, 50), 1);
|
|
30
|
+
const identifiers = { period };
|
|
31
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
32
|
+
};
|
|
19
33
|
const getPropositions = (n, { answer, period }) => {
|
|
20
34
|
const propositions = [];
|
|
21
35
|
addValidProp(propositions, answer);
|
|
@@ -36,13 +50,12 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
36
50
|
export const findSoundFrequencyFromPeriod = {
|
|
37
51
|
id: "findSoundFrequencyFromPeriod",
|
|
38
52
|
label: "Calculer la fréquence d'un signal sonore en fonction de la période",
|
|
39
|
-
levels: ["2nde"],
|
|
40
53
|
isSingleStep: true,
|
|
41
|
-
sections: ["Son"],
|
|
42
54
|
generator: (nb) => getDistinctQuestions(getFindSoundFrequencyFromPeriodQuestion, nb),
|
|
43
55
|
qcmTimer: 60,
|
|
44
56
|
freeTimer: 60,
|
|
45
57
|
getPropositions,
|
|
46
58
|
isAnswerValid,
|
|
47
59
|
subject: "Physique",
|
|
60
|
+
getQuestionFromIdentifiers,
|
|
48
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findSoundPeriodFromFrequency.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findSoundPeriodFromFrequency.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"findSoundPeriodFromFrequency.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findSoundPeriodFromFrequency.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAuEF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAY9D,CAAC"}
|
|
@@ -2,20 +2,34 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercis
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { Decimal } from "../../../math/numbers/decimals/decimal.js";
|
|
4
4
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
|
-
const
|
|
6
|
-
const frequency =
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { frequency } = identifiers;
|
|
7
|
+
return `Un signal sonore a une fréquence de $${frequency.frenchify()}\\ \\textrm{Hz}$.
|
|
8
|
+
|
|
9
|
+
Calculer la période de ce signal en secondes (en écriture scientifique avec $2$ chiffres significatifs).`;
|
|
10
|
+
};
|
|
11
|
+
const getAnswer = (identifiers) => {
|
|
12
|
+
const { frequency } = identifiers;
|
|
7
13
|
const period = 1 / frequency;
|
|
8
14
|
const periodDecimal = new Decimal(period);
|
|
9
15
|
const answer = periodDecimal.value.toScientific(1).toTex({ scientific: 1 });
|
|
16
|
+
return answer;
|
|
17
|
+
};
|
|
18
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
10
19
|
const question = {
|
|
11
|
-
answer,
|
|
12
|
-
instruction:
|
|
20
|
+
answer: getAnswer(identifiers),
|
|
21
|
+
instruction: getInstruction(identifiers),
|
|
13
22
|
keys: ["timesTenPower"],
|
|
14
23
|
answerFormat: "tex",
|
|
15
|
-
identifiers
|
|
24
|
+
identifiers,
|
|
16
25
|
};
|
|
17
26
|
return question;
|
|
18
27
|
};
|
|
28
|
+
const getFindSoundPeriodFromFrequencyQuestion = () => {
|
|
29
|
+
const frequency = randint(20, 20000);
|
|
30
|
+
const identifiers = { frequency };
|
|
31
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
32
|
+
};
|
|
19
33
|
const getPropositions = (n, { answer, frequency }) => {
|
|
20
34
|
const propositions = [];
|
|
21
35
|
const period = 1 / frequency;
|
|
@@ -43,13 +57,12 @@ const isAnswerValid = (ans, { frequency }) => {
|
|
|
43
57
|
export const findSoundPeriodFromFrequency = {
|
|
44
58
|
id: "findSoundPeriodFromFrequency",
|
|
45
59
|
label: "Calculer la période d'un signal sonore en fonction de la fréquence",
|
|
46
|
-
levels: ["2nde"],
|
|
47
60
|
isSingleStep: true,
|
|
48
|
-
sections: ["Son"],
|
|
49
61
|
generator: (nb) => getDistinctQuestions(getFindSoundPeriodFromFrequencyQuestion, nb),
|
|
50
62
|
qcmTimer: 60,
|
|
51
63
|
freeTimer: 60,
|
|
52
64
|
getPropositions,
|
|
53
65
|
isAnswerValid,
|
|
54
66
|
subject: "Physique",
|
|
67
|
+
getQuestionFromIdentifiers,
|
|
55
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frequencyComparison.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/frequencyComparison.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"frequencyComparison.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/frequencyComparison.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAwEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
|
|
@@ -2,31 +2,43 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercis
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
4
4
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { frequency1, frequency2, soundAsked } = identifiers;
|
|
7
|
+
return `La fréquence de deux sons sont $f_1 = ${frequency1}\\ \\text{Hz}$ et $f_2 = ${frequency2}\\ \\text{Hz}$. Le son $${soundAsked}$ est :`;
|
|
8
|
+
};
|
|
9
|
+
const getAnswer = (identifiers) => {
|
|
10
|
+
const { frequency1, frequency2, soundAsked } = identifiers;
|
|
7
11
|
const soundCompared = soundAsked === 1 ? 2 : 1;
|
|
8
|
-
const frequency1 = randint(20, 1000);
|
|
9
|
-
const frequency2 = randint(20, 1000, [frequency1]);
|
|
10
12
|
const highestFrequency = frequency1 > frequency2 ? 1 : 2;
|
|
11
13
|
const answer = soundAsked === highestFrequency
|
|
12
|
-
? `Plus aigu que le son
|
|
13
|
-
: `Plus grave que le son
|
|
14
|
+
? `Plus aigu que le son $${soundCompared}$`
|
|
15
|
+
: `Plus grave que le son $${soundCompared}$`;
|
|
16
|
+
return answer;
|
|
17
|
+
};
|
|
18
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
14
19
|
const question = {
|
|
15
|
-
answer,
|
|
16
|
-
instruction:
|
|
20
|
+
answer: getAnswer(identifiers),
|
|
21
|
+
instruction: getInstruction(identifiers),
|
|
17
22
|
keys: [],
|
|
18
23
|
answerFormat: "raw",
|
|
19
|
-
identifiers
|
|
24
|
+
identifiers,
|
|
20
25
|
};
|
|
21
26
|
return question;
|
|
22
27
|
};
|
|
28
|
+
const getFrequencyComparisonQuestion = () => {
|
|
29
|
+
const soundAsked = coinFlip() ? 1 : 2;
|
|
30
|
+
const frequency1 = randint(20, 1000);
|
|
31
|
+
const frequency2 = randint(20, 1000, [frequency1]);
|
|
32
|
+
const identifiers = { frequency1, frequency2, soundAsked };
|
|
33
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
34
|
+
};
|
|
23
35
|
const getPropositions = (n, { answer, soundAsked }) => {
|
|
24
36
|
const propositions = [];
|
|
25
37
|
const soundCompared = soundAsked === 1 ? 2 : 1;
|
|
26
38
|
addValidProp(propositions, answer, "raw");
|
|
27
|
-
tryToAddWrongProp(propositions, `Plus aigu que le son
|
|
28
|
-
tryToAddWrongProp(propositions, `Plus grave que le son
|
|
29
|
-
tryToAddWrongProp(propositions, `Aussi aigu que le son
|
|
39
|
+
tryToAddWrongProp(propositions, `Plus aigu que le son $${soundCompared}$`, "raw");
|
|
40
|
+
tryToAddWrongProp(propositions, `Plus grave que le son $${soundCompared}$`, "raw");
|
|
41
|
+
tryToAddWrongProp(propositions, `Aussi aigu que le son $${soundCompared}$`, "raw");
|
|
30
42
|
return shuffleProps(propositions, n);
|
|
31
43
|
};
|
|
32
44
|
const isAnswerValid = (ans, { answer }) => {
|
|
@@ -35,9 +47,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
35
47
|
export const frequencyComparison = {
|
|
36
48
|
id: "frequencyComparison",
|
|
37
49
|
label: "Comparer deux fréquences sonores",
|
|
38
|
-
levels: ["2nde"],
|
|
39
50
|
isSingleStep: true,
|
|
40
|
-
sections: ["Son"],
|
|
41
51
|
generator: (nb) => getDistinctQuestions(getFrequencyComparisonQuestion, nb),
|
|
42
52
|
qcmTimer: 60,
|
|
43
53
|
freeTimer: 60,
|
|
@@ -46,4 +56,5 @@ export const frequencyComparison = {
|
|
|
46
56
|
subject: "Physique",
|
|
47
57
|
answerType: "QCU",
|
|
48
58
|
pdfOptions: { shouldSpreadPropositions: true },
|
|
59
|
+
getQuestionFromIdentifiers,
|
|
49
60
|
};
|