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
|
@@ -2,19 +2,33 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercis
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randfloat } from "../../../math/utils/random/randfloat.js";
|
|
4
4
|
import { roundSignificant } from "../../../math/utils/round.js";
|
|
5
|
-
const
|
|
6
|
-
const mass
|
|
7
|
-
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { mass, molarMass } = identifiers;
|
|
7
|
+
return `On prélève $${roundSignificant(mass, 1)}\\ \\textrm{g}$ d'une espèce chimique de masse molaire $${roundSignificant(molarMass, 1)}\\ \\textrm{g}\\cdot \\textrm{mol}^{-1}$.
|
|
8
|
+
|
|
9
|
+
Quelle est la quantité de matière prélevée, en $\\textrm{mol}$ ?`;
|
|
10
|
+
};
|
|
11
|
+
const getAnswer = (identifiers) => {
|
|
12
|
+
const { mass, molarMass } = identifiers;
|
|
8
13
|
const answer = roundSignificant(mass / molarMass, 1);
|
|
14
|
+
return answer;
|
|
15
|
+
};
|
|
16
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
9
17
|
const question = {
|
|
10
|
-
answer,
|
|
11
|
-
instruction:
|
|
18
|
+
answer: getAnswer(identifiers),
|
|
19
|
+
instruction: getInstruction(identifiers),
|
|
12
20
|
keys: [],
|
|
13
21
|
answerFormat: "tex",
|
|
14
|
-
identifiers
|
|
22
|
+
identifiers,
|
|
15
23
|
};
|
|
16
24
|
return question;
|
|
17
25
|
};
|
|
26
|
+
const getMolFromMassQuestion = () => {
|
|
27
|
+
const mass = randfloat(5, 100, 1);
|
|
28
|
+
const molarMass = randfloat(5, 50, 1);
|
|
29
|
+
const identifiers = { mass, molarMass };
|
|
30
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
31
|
+
};
|
|
18
32
|
const getPropositions = (n, { answer }) => {
|
|
19
33
|
const propositions = [];
|
|
20
34
|
addValidProp(propositions, answer);
|
|
@@ -30,13 +44,12 @@ export const molFromMass = {
|
|
|
30
44
|
id: "molFromMass",
|
|
31
45
|
connector: "=",
|
|
32
46
|
label: "Calculer une quantité de matière en fonction de la masse",
|
|
33
|
-
levels: ["1reSpé"],
|
|
34
47
|
isSingleStep: true,
|
|
35
|
-
sections: ["Mol"],
|
|
36
48
|
generator: (nb) => getDistinctQuestions(getMolFromMassQuestion, nb),
|
|
37
49
|
qcmTimer: 60,
|
|
38
50
|
freeTimer: 60,
|
|
39
51
|
getPropositions,
|
|
40
52
|
isAnswerValid,
|
|
41
53
|
subject: "Chimie",
|
|
54
|
+
getQuestionFromIdentifiers,
|
|
42
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"molFromMolarMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/molFromMolarMass.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"molFromMolarMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/molFromMolarMass.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAsDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -2,19 +2,33 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercis
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randfloat } from "../../../math/utils/random/randfloat.js";
|
|
4
4
|
import { roundSignificant } from "../../../math/utils/round.js";
|
|
5
|
-
const
|
|
6
|
-
const mol
|
|
7
|
-
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { mol, molarMass } = identifiers;
|
|
7
|
+
return `On souhaite prélever $${roundSignificant(mol, 1)} \\ \\textrm{mol}$ d'une espèce chimique de masse molaire $M = ${roundSignificant(molarMass, 1)}\\ \\textrm{g}\\cdot \\textrm{mol}^{-1}$.
|
|
8
|
+
|
|
9
|
+
Quelle est la masse $m$ à prélever, en $\\textrm{g}$ ?`;
|
|
10
|
+
};
|
|
11
|
+
const getAnswer = (identifiers) => {
|
|
12
|
+
const { mol, molarMass } = identifiers;
|
|
8
13
|
const answer = roundSignificant(mol * molarMass, 1);
|
|
14
|
+
return answer;
|
|
15
|
+
};
|
|
16
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
9
17
|
const question = {
|
|
10
|
-
answer,
|
|
11
|
-
instruction:
|
|
18
|
+
answer: getAnswer(identifiers),
|
|
19
|
+
instruction: getInstruction(identifiers),
|
|
12
20
|
keys: [],
|
|
13
21
|
answerFormat: "tex",
|
|
14
|
-
identifiers
|
|
22
|
+
identifiers,
|
|
15
23
|
};
|
|
16
24
|
return question;
|
|
17
25
|
};
|
|
26
|
+
const getMolFromMolarMassQuestion = () => {
|
|
27
|
+
const mol = randfloat(1.1, 4, 1);
|
|
28
|
+
const molarMass = randfloat(10, 50, 1);
|
|
29
|
+
const identifiers = { mol, molarMass };
|
|
30
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
31
|
+
};
|
|
18
32
|
const getPropositions = (n, { answer }) => {
|
|
19
33
|
const propositions = [];
|
|
20
34
|
addValidProp(propositions, answer);
|
|
@@ -30,13 +44,12 @@ export const molFromMolarMass = {
|
|
|
30
44
|
id: "molFromMolarMass",
|
|
31
45
|
connector: "=",
|
|
32
46
|
label: "Calculer une masse en fonction de la quantité de matière",
|
|
33
|
-
levels: ["1reSpé"],
|
|
34
47
|
isSingleStep: true,
|
|
35
|
-
sections: ["Mol"],
|
|
36
48
|
generator: (nb) => getDistinctQuestions(getMolFromMolarMassQuestion, nb),
|
|
37
49
|
qcmTimer: 60,
|
|
38
50
|
freeTimer: 60,
|
|
39
51
|
getPropositions,
|
|
40
52
|
isAnswerValid,
|
|
41
53
|
subject: "Chimie",
|
|
54
|
+
getQuestionFromIdentifiers,
|
|
42
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"molarMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/molarMass.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"molarMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/molarMass.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAwDF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,CAY3C,CAAC"}
|
|
@@ -5,19 +5,33 @@ import { round, roundSignificant } from "../../../math/utils/round.js";
|
|
|
5
5
|
import { molecules } from "../../../pc/constants/molecularChemistry/molecule.js";
|
|
6
6
|
import { random } from "../../../utils/alea/random.js";
|
|
7
7
|
import { requiresApostropheBefore } from "../../../utils/strings/requiresApostropheBefore.js";
|
|
8
|
-
const
|
|
9
|
-
const molecule =
|
|
10
|
-
const
|
|
11
|
-
const
|
|
8
|
+
const getInstruction = (identifiers) => {
|
|
9
|
+
const { molecule } = identifiers;
|
|
10
|
+
const mol = molecules.find((m) => m.formula === molecule);
|
|
11
|
+
const article = requiresApostropheBefore(mol.name) ? "de l'" : "du ";
|
|
12
|
+
return `Calculer la masse molaire ${article}${mol.name.toLocaleLowerCase()} $${mol.formula}$.`;
|
|
13
|
+
};
|
|
14
|
+
const getAnswer = (identifiers) => {
|
|
15
|
+
const { molecule } = identifiers;
|
|
16
|
+
const mol = molecules.find((m) => m.formula === molecule);
|
|
17
|
+
const weight = mol.atoms.reduce((acc, curr) => acc + curr.count * round(curr.atom.masseAtomique, 1), 0);
|
|
18
|
+
return roundSignificant(weight, 1);
|
|
19
|
+
};
|
|
20
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
12
21
|
const question = {
|
|
13
|
-
answer:
|
|
14
|
-
instruction:
|
|
22
|
+
answer: getAnswer(identifiers),
|
|
23
|
+
instruction: getInstruction(identifiers),
|
|
15
24
|
keys: [],
|
|
16
25
|
answerFormat: "tex",
|
|
17
|
-
identifiers
|
|
26
|
+
identifiers,
|
|
18
27
|
};
|
|
19
28
|
return question;
|
|
20
29
|
};
|
|
30
|
+
const getMolarMassQuestion = () => {
|
|
31
|
+
const molecule = random(molecules.slice(0, 50).filter((m) => m.atoms.length > 1));
|
|
32
|
+
const identifiers = { molecule: molecule.formula };
|
|
33
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
34
|
+
};
|
|
21
35
|
const getPropositions = (n, { answer }) => {
|
|
22
36
|
const propositions = [];
|
|
23
37
|
addValidProp(propositions, answer);
|
|
@@ -33,13 +47,12 @@ export const molarMass = {
|
|
|
33
47
|
id: "molarMass",
|
|
34
48
|
connector: "=",
|
|
35
49
|
label: "Calculer une masse molaire",
|
|
36
|
-
levels: ["1reSpé"],
|
|
37
50
|
isSingleStep: true,
|
|
38
|
-
sections: ["Mol"],
|
|
39
51
|
generator: (nb) => getDistinctQuestions(getMolarMassQuestion, nb),
|
|
40
52
|
qcmTimer: 60,
|
|
41
53
|
freeTimer: 60,
|
|
42
54
|
getPropositions,
|
|
43
55
|
isAnswerValid,
|
|
44
56
|
subject: "Chimie",
|
|
57
|
+
getQuestionFromIdentifiers,
|
|
45
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moleculeCountFromMassAndAvogadro.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/moleculeCountFromMassAndAvogadro.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"moleculeCountFromMassAndAvogadro.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/moleculeCountFromMassAndAvogadro.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAmGF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAYlE,CAAC"}
|
|
@@ -7,23 +7,38 @@ import { random } from "../../../utils/alea/random.js";
|
|
|
7
7
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
8
8
|
import { avogadroConstant } from "../../../pc/constants/molecularChemistry/atoms.js";
|
|
9
9
|
import { requiresApostropheBefore } from "../../../utils/strings/requiresApostropheBefore.js";
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { moleculeName, sampleMass, molarMass } = identifiers;
|
|
12
|
+
const instruction = `Un échantillon a une masse $m = ${frenchify(sampleMass)}\\ \\textrm{g}$ de ${requiresApostropheBefore(moleculeName) ? "d'" : "de "}${moleculeName}.
|
|
13
|
+
|
|
14
|
+
La masse molaire ${requiresApostropheBefore(moleculeName) ? "d'" : "de "}${moleculeName} est de $${molarMass}\\ \\textrm{g}/\\textrm{mol}$.
|
|
15
|
+
|
|
16
|
+
Déterminer le nombre de molécules ${requiresApostropheBefore(moleculeName) ? "d'" : "de "}${moleculeName}.`;
|
|
17
|
+
return instruction;
|
|
18
|
+
};
|
|
19
|
+
const getAnswer = (identifiers) => {
|
|
20
|
+
const { sampleMass, molarMass } = identifiers;
|
|
14
21
|
const Na = avogadroConstant.value.toSignificant(2);
|
|
15
22
|
const entitiesNumber = Na.times(sampleMass / molarMass).toSignificant(2);
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
return entitiesNumber.toTex();
|
|
24
|
+
};
|
|
25
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
18
26
|
const question = {
|
|
19
|
-
answer:
|
|
20
|
-
instruction,
|
|
27
|
+
answer: getAnswer(identifiers),
|
|
28
|
+
instruction: getInstruction(identifiers),
|
|
21
29
|
keys: ["mol", "timesTenPower"],
|
|
22
30
|
answerFormat: "tex",
|
|
23
|
-
identifiers
|
|
31
|
+
identifiers,
|
|
24
32
|
};
|
|
25
33
|
return question;
|
|
26
34
|
};
|
|
35
|
+
const getMoleculeCountFromMassAndAvogadroQuestion = () => {
|
|
36
|
+
const molecule = random(molecules);
|
|
37
|
+
const sampleMass = randfloat(0.1, 2, 2); // Sample mass in grams
|
|
38
|
+
const molarMass = molecule.weight; // Molar mass in g/mol
|
|
39
|
+
const identifiers = { moleculeName: molecule.name, sampleMass, molarMass };
|
|
40
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
41
|
+
};
|
|
27
42
|
const getPropositions = (n, { answer, moleculeName, sampleMass }) => {
|
|
28
43
|
const propositions = [];
|
|
29
44
|
addValidProp(propositions, answer);
|
|
@@ -60,13 +75,12 @@ const isAnswerValid = (ans, { answer, sampleMass, molarMass }) => {
|
|
|
60
75
|
export const MoleculeCountFromMassAndAvogadro = {
|
|
61
76
|
id: "moleculeCountFromMassAndAvogadro",
|
|
62
77
|
label: "Déterminer le nombre de molécules dans un échantillon",
|
|
63
|
-
levels: ["2nde", "1reSpé"],
|
|
64
78
|
isSingleStep: true,
|
|
65
|
-
sections: ["Chimie organique"],
|
|
66
79
|
generator: (nb) => getDistinctQuestions(getMoleculeCountFromMassAndAvogadroQuestion, nb),
|
|
67
80
|
qcmTimer: 60,
|
|
68
81
|
freeTimer: 60,
|
|
69
82
|
getPropositions,
|
|
70
83
|
isAnswerValid,
|
|
71
84
|
subject: "Chimie",
|
|
85
|
+
getQuestionFromIdentifiers,
|
|
72
86
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moleculeCountFromMol.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/moleculeCountFromMol.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"moleculeCountFromMol.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/moleculeCountFromMol.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AA+ExC,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAYtD,CAAC"}
|
|
@@ -2,20 +2,32 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercis
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randfloat } from "../../../math/utils/random/randfloat.js";
|
|
4
4
|
import { avogadroConstant } from "../../../pc/constants/molecularChemistry/atoms.js";
|
|
5
|
-
const
|
|
6
|
-
const quantity =
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { quantity } = identifiers;
|
|
7
|
+
return `Calculer le nombre de molécules dans un échantillon contenant $${quantity.frenchify()} \\ mol$ de substance.`;
|
|
8
|
+
};
|
|
9
|
+
const getAnswer = (identifiers) => {
|
|
10
|
+
const { quantity } = identifiers;
|
|
7
11
|
const numberOfMolecules = avogadroConstant.value
|
|
8
12
|
.times(quantity)
|
|
9
13
|
.toSignificant(2);
|
|
14
|
+
return numberOfMolecules.toTex();
|
|
15
|
+
};
|
|
16
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
10
17
|
const question = {
|
|
11
|
-
answer:
|
|
12
|
-
instruction:
|
|
18
|
+
answer: getAnswer(identifiers),
|
|
19
|
+
instruction: getInstruction(identifiers),
|
|
13
20
|
keys: ["mol", "timesTenPower"],
|
|
14
21
|
answerFormat: "tex",
|
|
15
|
-
identifiers
|
|
22
|
+
identifiers,
|
|
16
23
|
};
|
|
17
24
|
return question;
|
|
18
25
|
};
|
|
26
|
+
const getMoleculeCountFromMolQuestion = () => {
|
|
27
|
+
const quantity = randfloat(0.01, 100, 2); // Quantité de matière en moles, entre 0.01 et 10 moles
|
|
28
|
+
const identifiers = { quantity };
|
|
29
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
30
|
+
};
|
|
19
31
|
const getPropositions = (n, { answer, quantity }) => {
|
|
20
32
|
const propositions = [];
|
|
21
33
|
addValidProp(propositions, answer);
|
|
@@ -51,13 +63,12 @@ const isAnswerValid = (ans, { answer, quantity }) => {
|
|
|
51
63
|
export const moleculeCountFromMol = {
|
|
52
64
|
id: "moleculeCountFromMol",
|
|
53
65
|
label: "Calculer le nombre de molécules dans un échantillon",
|
|
54
|
-
levels: ["2nde"],
|
|
55
66
|
isSingleStep: true,
|
|
56
|
-
sections: ["Chimie organique"],
|
|
57
67
|
generator: (nb) => getDistinctQuestions(getMoleculeCountFromMolQuestion, nb),
|
|
58
68
|
qcmTimer: 60,
|
|
59
69
|
freeTimer: 60,
|
|
60
70
|
getPropositions,
|
|
61
71
|
isAnswerValid,
|
|
62
72
|
subject: "Chimie",
|
|
73
|
+
getQuestionFromIdentifiers,
|
|
63
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moleculeFormula.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/moleculeFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,
|
|
1
|
+
{"version":3,"file":"moleculeFormula.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/moleculeFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,EAKT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAmFF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
|
|
@@ -2,22 +2,44 @@ import { addValidProp, tryToAddWrongProp, } from "../../exercises/exercise.js";
|
|
|
2
2
|
import { getDistinctQuestions } from "../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { molecules } from "../../pc/constants/molecularChemistry/molecule.js";
|
|
4
4
|
import { shuffle } from "../../utils/alea/shuffle.js";
|
|
5
|
-
const
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { randomMoleculeIndex } = identifiers;
|
|
6
7
|
const organicMolecule = molecules.filter((molecule) => molecule.isOrganic && molecule.iupact);
|
|
7
|
-
const randomMoleculeIndex = Math.floor(Math.random() * organicMolecule.length);
|
|
8
8
|
const myRandomMolecule = organicMolecule[randomMoleculeIndex];
|
|
9
9
|
const instruction = `Donner la formule brute de la molécule suivante :
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
`;
|
|
12
|
+
return instruction;
|
|
13
|
+
};
|
|
14
|
+
const getAnswer = (identifiers) => {
|
|
15
|
+
const { randomMoleculeIndex } = identifiers;
|
|
16
|
+
const organicMolecule = molecules.filter((molecule) => molecule.isOrganic && molecule.iupact);
|
|
17
|
+
const myRandomMolecule = organicMolecule[randomMoleculeIndex];
|
|
11
18
|
const answer = myRandomMolecule.formula;
|
|
19
|
+
return answer;
|
|
20
|
+
};
|
|
21
|
+
const getKeys = (identifiers) => {
|
|
22
|
+
const { randomMoleculeIndex } = identifiers;
|
|
23
|
+
const organicMolecule = molecules.filter((molecule) => molecule.isOrganic && molecule.iupact);
|
|
24
|
+
const myRandomMolecule = organicMolecule[randomMoleculeIndex];
|
|
25
|
+
return [...myRandomMolecule.atoms.map((el) => el.atom.name), "underscore"];
|
|
26
|
+
};
|
|
27
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
12
28
|
const question = {
|
|
13
|
-
instruction,
|
|
14
|
-
answer,
|
|
15
|
-
keys:
|
|
29
|
+
instruction: getInstruction(identifiers),
|
|
30
|
+
answer: getAnswer(identifiers),
|
|
31
|
+
keys: getKeys(identifiers),
|
|
16
32
|
answerFormat: "tex",
|
|
17
|
-
identifiers
|
|
33
|
+
identifiers,
|
|
18
34
|
};
|
|
19
35
|
return question;
|
|
20
36
|
};
|
|
37
|
+
const getMoleculeNFormula = () => {
|
|
38
|
+
const organicMolecule = molecules.filter((molecule) => molecule.isOrganic && molecule.iupact);
|
|
39
|
+
const randomMoleculeIndex = Math.floor(Math.random() * organicMolecule.length);
|
|
40
|
+
const identifiers = { randomMoleculeIndex };
|
|
41
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
42
|
+
};
|
|
21
43
|
const getPropositions = (n, { answer, randomMoleculeIndex }) => {
|
|
22
44
|
const organicMolecule = molecules.filter((molecule) => molecule.isOrganic && molecule.iupact);
|
|
23
45
|
const propositions = [];
|
|
@@ -36,8 +58,6 @@ export const moleculeFormula = {
|
|
|
36
58
|
id: "moleculeFormula",
|
|
37
59
|
connector: "\\iff",
|
|
38
60
|
label: "Donner la formule brute d'une molécule à partir de sa formule développée",
|
|
39
|
-
levels: ["4ème", "3ème", "2nde"],
|
|
40
|
-
sections: ["Chimie organique"],
|
|
41
61
|
subject: "Chimie",
|
|
42
62
|
isSingleStep: true,
|
|
43
63
|
generator: (nb) => getDistinctQuestions(getMoleculeNFormula, nb, 20),
|
|
@@ -46,4 +66,5 @@ export const moleculeFormula = {
|
|
|
46
66
|
getPropositions,
|
|
47
67
|
isAnswerValid,
|
|
48
68
|
maxAllowedQuestions: 20,
|
|
69
|
+
getQuestionFromIdentifiers,
|
|
49
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moleculeNomenclature.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/moleculeNomenclature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"moleculeNomenclature.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/moleculeNomenclature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAuEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
|
|
@@ -2,21 +2,37 @@ import { addValidProp, tryToAddWrongProp, } from "../../exercises/exercise.js";
|
|
|
2
2
|
import { getDistinctQuestions } from "../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { molecules } from "../../pc/constants/molecularChemistry/molecule.js";
|
|
4
4
|
import { shuffle } from "../../utils/alea/shuffle.js";
|
|
5
|
-
const
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { randomMoleculeIndex } = identifiers;
|
|
6
7
|
const organicMolecule = molecules.filter((molecule) => molecule.isOrganic && molecule.type);
|
|
7
|
-
const randomMoleculeIndex = Math.floor(Math.random() * organicMolecule.length);
|
|
8
8
|
const myRandomMolecule = organicMolecule[randomMoleculeIndex];
|
|
9
9
|
const instruction = `Donner le nom de la molécule suivante :
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
`;
|
|
12
|
+
return instruction;
|
|
13
|
+
};
|
|
14
|
+
const getAnswer = (identifiers) => {
|
|
15
|
+
const { randomMoleculeIndex } = identifiers;
|
|
16
|
+
const organicMolecule = molecules.filter((molecule) => molecule.isOrganic && molecule.type);
|
|
17
|
+
const myRandomMolecule = organicMolecule[randomMoleculeIndex];
|
|
18
|
+
return myRandomMolecule.iupact;
|
|
19
|
+
};
|
|
20
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
11
21
|
const question = {
|
|
12
|
-
instruction,
|
|
13
|
-
answer:
|
|
22
|
+
instruction: getInstruction(identifiers),
|
|
23
|
+
answer: getAnswer(identifiers),
|
|
14
24
|
keys: [],
|
|
15
25
|
answerFormat: "raw",
|
|
16
|
-
identifiers
|
|
26
|
+
identifiers,
|
|
17
27
|
};
|
|
18
28
|
return question;
|
|
19
29
|
};
|
|
30
|
+
const getMoleculeNomenclature = () => {
|
|
31
|
+
const organicMolecule = molecules.filter((molecule) => molecule.isOrganic && molecule.type);
|
|
32
|
+
const randomMoleculeIndex = Math.floor(Math.random() * organicMolecule.length);
|
|
33
|
+
const identifiers = { randomMoleculeIndex };
|
|
34
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
35
|
+
};
|
|
20
36
|
const getPropositions = (n, { answer }) => {
|
|
21
37
|
const propositions = [];
|
|
22
38
|
addValidProp(propositions, answer, "raw");
|
|
@@ -35,8 +51,6 @@ export const moleculeNomenclature = {
|
|
|
35
51
|
id: "moleculeNomenclature",
|
|
36
52
|
connector: "\\iff",
|
|
37
53
|
label: "Donner le nom d'une molécule à partir de sa formule développée",
|
|
38
|
-
levels: ["4ème", "3ème", "2nde"],
|
|
39
|
-
sections: ["Chimie organique"],
|
|
40
54
|
subject: "Chimie",
|
|
41
55
|
isSingleStep: true,
|
|
42
56
|
generator: (nb) => getDistinctQuestions(getMoleculeNomenclature, nb, 20),
|
|
@@ -45,4 +59,5 @@ export const moleculeNomenclature = {
|
|
|
45
59
|
getPropositions,
|
|
46
60
|
isAnswerValid,
|
|
47
61
|
maxAllowedQuestions: 20,
|
|
62
|
+
getQuestionFromIdentifiers,
|
|
48
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"averageSpeed.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/averageSpeed.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"averageSpeed.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/averageSpeed.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,KAAK,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAwKpD,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAY9C,CAAC"}
|
|
@@ -7,21 +7,79 @@ import { DistanceUnit } from "../../../pc/units/distanceUnits.js";
|
|
|
7
7
|
import { TimeUnit } from "../../../pc/units/timeUnits.js";
|
|
8
8
|
import { FractionNode } from "../../../tree/nodes/operators/fractionNode.js";
|
|
9
9
|
import { VariableNode } from "../../../tree/nodes/variables/variableNode.js";
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { distance, time } = identifiers;
|
|
12
|
+
const distanceMeasure = new Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]);
|
|
13
|
+
const timeMeasure = new Measure(time.value, 0, timeUnits[time.unitIndex]);
|
|
14
|
+
const instruction = `Soit un objet parcourant $${distanceMeasure.toTex({
|
|
15
|
+
notScientific: true,
|
|
16
|
+
})}$ en $${timeMeasure.toTex({ notScientific: true })}$.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Caculer la vitesse moyenne de cet objet en $${DistanceUnit.m.toTex()} \\cdot ${TimeUnit.s.toTex()}^{-1}$.
|
|
20
|
+
`;
|
|
21
|
+
return instruction;
|
|
22
|
+
};
|
|
23
|
+
const getAnswer = (identifiers) => {
|
|
24
|
+
const { distance, time } = identifiers;
|
|
25
|
+
const distanceMeasure = new Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]);
|
|
26
|
+
const timeMeasure = new Measure(time.value, 0, timeUnits[time.unitIndex]);
|
|
27
|
+
const answer = distanceMeasure
|
|
28
|
+
.convert("m")
|
|
29
|
+
.divide(timeMeasure.convert("s"))
|
|
30
|
+
.toSignificant(2);
|
|
31
|
+
return answer.toTex();
|
|
32
|
+
};
|
|
33
|
+
const getHint = (identifiers) => {
|
|
34
|
+
return `La vitesse moyenne est donnée par :
|
|
35
|
+
|
|
36
|
+
$$
|
|
37
|
+
\\frac{\\text{distance}}{\\text{temps}} \\ \\textrm{m} \\cdot \\textrm{s}^{-1}
|
|
38
|
+
$$`;
|
|
39
|
+
};
|
|
40
|
+
const getCorrection = (identifiers) => {
|
|
41
|
+
const { distance, time } = identifiers;
|
|
42
|
+
let correction = ``;
|
|
43
|
+
let step = 1;
|
|
44
|
+
const distanceMeasure = new Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]).convert("m");
|
|
45
|
+
const timeMeasure = new Measure(time.value, 0, timeUnits[time.unitIndex]).convert("s");
|
|
46
|
+
const calcul = new FractionNode(new VariableNode(distanceMeasure.toSignificant(2).toTex()), new VariableNode(timeMeasure.toSignificant(2).toTex()));
|
|
47
|
+
const answer = distanceMeasure.divide(timeMeasure).toSignificant(2).toTex();
|
|
48
|
+
if (distance.unitIndex === 0)
|
|
49
|
+
correction = `- On convertit les $\\textrm{km}$ en $\\textrm{m}$ : $1\\ \\textrm{km}=1000\\ \\textrm{m}$.`;
|
|
50
|
+
switch (time.unitIndex) {
|
|
51
|
+
case 0:
|
|
52
|
+
correction = `${correction}
|
|
53
|
+
- On convertit les heures en secondes : $1\\ \\textrm{h} = 3600\\ \\textrm{s}$.`;
|
|
54
|
+
break;
|
|
55
|
+
case 1:
|
|
56
|
+
default:
|
|
57
|
+
correction = `${correction}
|
|
58
|
+
- On convertit les minutes en secondes : $1\\ \\textrm{m} = 60\\ \\textrm{s}$.`;
|
|
59
|
+
}
|
|
60
|
+
return `${correction}
|
|
61
|
+
- On applique la règle de calcul pour la vitesse moyenne : $${calcul.toTex()} = ${answer}$`;
|
|
62
|
+
};
|
|
63
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
14
64
|
const question = {
|
|
15
|
-
answer:
|
|
16
|
-
instruction:
|
|
65
|
+
answer: getAnswer(identifiers),
|
|
66
|
+
instruction: getInstruction(identifiers),
|
|
17
67
|
keys: [],
|
|
18
|
-
hint:
|
|
19
|
-
correction:
|
|
68
|
+
hint: getHint(identifiers),
|
|
69
|
+
correction: getCorrection(identifiers),
|
|
20
70
|
answerFormat: "tex",
|
|
21
|
-
identifiers
|
|
71
|
+
identifiers,
|
|
22
72
|
};
|
|
23
73
|
return question;
|
|
24
74
|
};
|
|
75
|
+
const timeUnits = [TimeUnit.h, TimeUnit.mi];
|
|
76
|
+
const distanceUnitValues = [DistanceUnit.km, DistanceUnit.m];
|
|
77
|
+
const getAverageSpeedQuestion = () => {
|
|
78
|
+
const distance = { value: randint(70, 151), unitIndex: randint(0, 2) };
|
|
79
|
+
const time = { value: randint(10, 61), unitIndex: randint(0, 2) };
|
|
80
|
+
const identifiers = { distance, time };
|
|
81
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
82
|
+
};
|
|
25
83
|
const getPropositions = (n, { answer, distance, time }) => {
|
|
26
84
|
const propositions = [];
|
|
27
85
|
addValidProp(propositions, answer);
|
|
@@ -59,56 +117,10 @@ const isAnswerValid = (ans, { answer, distance, time }) => {
|
|
|
59
117
|
.toTex({ hideUnit: true }),
|
|
60
118
|
].includes(ans);
|
|
61
119
|
};
|
|
62
|
-
const generateExercise = () => {
|
|
63
|
-
const distance = { value: randint(70, 151), unitIndex: randint(0, 2) };
|
|
64
|
-
const time = { value: randint(10, 61), unitIndex: randint(0, 2) };
|
|
65
|
-
const distanceMeasure = new Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]);
|
|
66
|
-
const timeMeasure = new Measure(time.value, 0, timeUnits[time.unitIndex]);
|
|
67
|
-
const instruction = `Soit un objet parcourant $${distanceMeasure.toTex({
|
|
68
|
-
notScientific: true,
|
|
69
|
-
})}$ en $${timeMeasure.toTex({ notScientific: true })}$. \n \\
|
|
70
|
-
Caculer la vitesse moyenne de cet objet en $${DistanceUnit.m.toTex()} \\cdot ${TimeUnit.s.toTex()}^{-1}$.
|
|
71
|
-
`;
|
|
72
|
-
const answer = distanceMeasure
|
|
73
|
-
.convert("m")
|
|
74
|
-
.divide(timeMeasure.convert("s"))
|
|
75
|
-
.toSignificant(2);
|
|
76
|
-
const correction = getCorrection(distance, time);
|
|
77
|
-
return {
|
|
78
|
-
instruction,
|
|
79
|
-
answer,
|
|
80
|
-
distance,
|
|
81
|
-
time,
|
|
82
|
-
correction,
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
const getCorrection = (distance, time) => {
|
|
86
|
-
let correction = ``;
|
|
87
|
-
let step = 1;
|
|
88
|
-
const distanceMeasure = new Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]).convert("m");
|
|
89
|
-
const timeMeasure = new Measure(time.value, 0, timeUnits[time.unitIndex]).convert("s");
|
|
90
|
-
const calcul = new FractionNode(new VariableNode(distanceMeasure.toSignificant(2).toTex()), new VariableNode(timeMeasure.toSignificant(2).toTex()));
|
|
91
|
-
const answer = distanceMeasure.divide(timeMeasure).toSignificant(2).toTex();
|
|
92
|
-
if (distance.unitIndex === 0)
|
|
93
|
-
correction = `${step++}. Convertir les $km$ en $m$ : $1km=1000m$.`;
|
|
94
|
-
switch (time.unitIndex) {
|
|
95
|
-
case 0:
|
|
96
|
-
correction = `${correction}
|
|
97
|
-
${step++}. Convertir les heures en secondes : $1h = 3600s$.`;
|
|
98
|
-
break;
|
|
99
|
-
case 1:
|
|
100
|
-
correction = `${correction}
|
|
101
|
-
${step++}. Convertir les minutes en secondes : $1m = 60s$.`;
|
|
102
|
-
}
|
|
103
|
-
return `${correction}
|
|
104
|
-
${step}. Appliquer la règle de calcul pour la vitesse moyenne : $${calcul.toTex()} = ${answer}$`;
|
|
105
|
-
};
|
|
106
120
|
export const averageSpeed = {
|
|
107
121
|
id: "averageSpeed",
|
|
108
122
|
label: "Caclul de vitesse moyenne",
|
|
109
|
-
levels: ["2nde"],
|
|
110
123
|
isSingleStep: true,
|
|
111
|
-
sections: ["Mécanique"],
|
|
112
124
|
generator: (nb) => getDistinctQuestions(getAverageSpeedQuestion, nb),
|
|
113
125
|
qcmTimer: 60,
|
|
114
126
|
freeTimer: 60,
|
|
@@ -116,4 +128,5 @@ export const averageSpeed = {
|
|
|
116
128
|
isAnswerValid,
|
|
117
129
|
subject: "Physique",
|
|
118
130
|
hasHintAndCorrection: true,
|
|
131
|
+
getQuestionFromIdentifiers,
|
|
119
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"averageSpeedCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/averageSpeedCalculation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"averageSpeedCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/averageSpeedCalculation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,iBAAiB,GAAG,UAAU,GAAG,OAAO,CAAC;CAClD,CAAC;AA8PF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
|