math-exercises 3.0.157 → 3.0.159
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 +7 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.d.ts +14 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.js +145 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts +16 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.js +445 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts +15 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.js +371 -0
- package/lib/exercises/math/calculLitteral/equation/exp/index.d.ts +4 -0
- package/lib/exercises/math/calculLitteral/equation/exp/index.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/exp/index.js +3 -0
- package/lib/exercises/math/calculLitteral/equation/factorizeEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/factorizeEquation.js +8 -2
- package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.js +1 -0
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +27 -2
- package/lib/exercises/math/calculLitteral/equation/solveByFactorizingWithIdRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/solveByFactorizingWithIdRmq3.js +0 -1
- package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.js +0 -1
- package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts +18 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.js +444 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/index.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/exp/index.js +1 -0
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +11 -5
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/index.js +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +91 -21
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +64 -15
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +71 -15
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +36 -17
- package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.js +294 -0
- package/lib/exercises/math/derivation/derivative/exp/index.d.ts +1 -0
- package/lib/exercises/math/derivation/derivative/exp/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/index.js +1 -0
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +30 -2
- package/lib/exercises/math/derivation/derivative/productDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/productDerivative.js +68 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.js +40 -4
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +30 -3
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.d.ts +12 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.js +127 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.d.ts +13 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.js +161 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.d.ts +11 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.js +116 -0
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.d.ts +8 -0
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.js +142 -0
- package/lib/exercises/math/derivation/derivativeNumber/index.d.ts +4 -0
- package/lib/exercises/math/derivation/derivativeNumber/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/index.js +4 -0
- package/lib/exercises/math/derivation/index.d.ts +1 -1
- package/lib/exercises/math/derivation/index.js +1 -1
- package/lib/exercises/math/derivation/variations/index.d.ts +1 -0
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/index.js +1 -0
- package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.d.ts +7 -0
- package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.js +174 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts +13 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.js +305 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts +11 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.js +216 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpN.d.ts +9 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpN.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/approxExpN.js +142 -0
- package/lib/exercises/math/functions/exponential/algebraic/index.d.ts +5 -0
- package/lib/exercises/math/functions/exponential/algebraic/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/index.js +4 -0
- package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.d.ts +14 -0
- package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.js +337 -0
- package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts +11 -0
- package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.js +223 -0
- package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts +9 -0
- package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.js +262 -0
- package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts +9 -0
- package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.js +245 -0
- package/lib/exercises/math/functions/exponential/definition/index.d.ts +5 -0
- package/lib/exercises/math/functions/exponential/definition/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/definition/index.js +4 -0
- package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts +13 -0
- package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.js +366 -0
- package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expFactorization.js +54 -42
- package/lib/exercises/math/functions/exponential/index.d.ts +2 -0
- package/lib/exercises/math/functions/exponential/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/index.js +2 -0
- package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.js +30 -3
- package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.js +35 -1
- package/lib/exercises/math/functions/trinoms/equation/secondDegreeInequation.js +3 -0
- package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.js +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.js +23 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.js +29 -0
- package/lib/exercises/math/functions/variations/exp/index.d.ts +3 -0
- package/lib/exercises/math/functions/variations/exp/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/exp/index.js +2 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts +9 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.js +96 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts +11 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.js +190 -0
- package/lib/exercises/math/functions/variations/index.d.ts +1 -0
- package/lib/exercises/math/functions/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/index.js +1 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.d.ts +12 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.js +230 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPointAndNormalVector.d.ts +10 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPointAndNormalVector.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPointAndNormalVector.js +167 -0
- package/lib/exercises/math/geometry/cartesian/index.d.ts +3 -0
- package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/index.js +3 -0
- package/lib/exercises/math/geometry/cartesian/normalVectorFromCartesianLineEquation.d.ts +10 -0
- package/lib/exercises/math/geometry/cartesian/normalVectorFromCartesianLineEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/normalVectorFromCartesianLineEquation.js +131 -0
- package/lib/exercises/math/geometry/circles/index.d.ts +2 -0
- package/lib/exercises/math/geometry/circles/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/index.js +1 -0
- package/lib/exercises/math/geometry/circles/isPointOnCircleFromCartesianEquation.d.ts +11 -0
- package/lib/exercises/math/geometry/circles/isPointOnCircleFromCartesianEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/circles/isPointOnCircleFromCartesianEquation.js +131 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.js +2 -2
- package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.js +0 -2
- package/lib/exercises/math/geometry/index.d.ts +1 -0
- package/lib/exercises/math/geometry/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/index.js +1 -0
- package/lib/exercises/math/geometry/thales/thales.js +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +1 -1
- package/lib/exercises/math/geometry/vectors/colinearity/determinant.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/index.d.ts +4 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/index.js +3 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +247 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts +13 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.js +452 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +253 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/index.d.ts +4 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/index.js +3 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.d.ts +10 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.js +174 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.js +231 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.d.ts +14 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.js +292 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.js +33 -7
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/index.d.ts +6 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/index.js +5 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.js +202 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.js +127 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts +12 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.js +167 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.d.ts +12 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.js +180 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.d.ts +12 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.js +235 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts +12 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.js +423 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts +17 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.js +347 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.js +301 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +38 -1
- package/lib/exercises/math/probaStat/conditionalProbability.d.ts +4 -1
- package/lib/exercises/math/probaStat/conditionalProbability.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/conditionalProbability.js +38 -5
- package/lib/exercises/math/probaStat/independancy/independancy.d.ts +9 -0
- package/lib/exercises/math/probaStat/independancy/independancy.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/independancy/independancy.js +114 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCap.d.ts +9 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCap.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCap.js +101 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCup.d.ts +9 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCup.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/independancy/independancyFindCup.js +118 -0
- package/lib/exercises/math/probaStat/independancy/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/independancy/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/independancy/index.js +4 -0
- package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.d.ts +10 -0
- package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.js +106 -0
- package/lib/exercises/math/probaStat/index.d.ts +1 -1
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -1
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts +9 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.js +141 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueToMatchRandomVariableAverage.d.ts +10 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueToMatchRandomVariableAverage.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/findValueToMatchRandomVariableAverage.js +174 -0
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/index.js +2 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.js +7 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.js +7 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.js +7 -0
- package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.js +7 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.d.ts +9 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.d.ts.map +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.js +118 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +55 -6
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +42 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts +4 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +57 -7
- package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +24 -2
- package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +31 -8
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +11 -1
- package/lib/exercises/math/sequences/generation/index.d.ts +2 -0
- package/lib/exercises/math/sequences/generation/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/generation/index.js +1 -0
- package/lib/exercises/math/sequences/generation/recognizeRecurrenceOrExplicit.d.ts +8 -0
- package/lib/exercises/math/sequences/generation/recognizeRecurrenceOrExplicit.d.ts.map +1 -0
- package/lib/exercises/math/sequences/generation/recognizeRecurrenceOrExplicit.js +63 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstRankOne.js +5 -5
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +3 -1
- package/lib/exercises/math/sequences/geometric/geometricFindReason.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindReason.js +41 -2
- package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -2
- package/lib/exercises/math/sequences/graph/index.d.ts +2 -0
- package/lib/exercises/math/sequences/graph/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/graph/index.js +1 -0
- package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.d.ts +11 -0
- package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.d.ts.map +1 -0
- package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.js +113 -0
- package/lib/exercises/math/sequences/index.d.ts +2 -0
- package/lib/exercises/math/sequences/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/index.js +2 -0
- package/lib/exercises/math/sequences/notation/identifyRankInSequenceTermsList.d.ts +12 -0
- package/lib/exercises/math/sequences/notation/identifyRankInSequenceTermsList.d.ts.map +1 -0
- package/lib/exercises/math/sequences/notation/identifyRankInSequenceTermsList.js +114 -0
- package/lib/exercises/math/sequences/notation/identifySequenceTermInList.d.ts +12 -0
- package/lib/exercises/math/sequences/notation/identifySequenceTermInList.d.ts.map +1 -0
- package/lib/exercises/math/sequences/notation/identifySequenceTermInList.js +111 -0
- package/lib/exercises/math/sequences/notation/index.d.ts +3 -0
- package/lib/exercises/math/sequences/notation/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/notation/index.js +2 -0
- package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/sequenceEvaluation.js +22 -2
- package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.js +0 -1
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +0 -2
- package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.d.ts +9 -0
- package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.js +107 -0
- package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts +10 -0
- package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/associatePoint.js +86 -0
- package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.d.ts +10 -0
- package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.js +205 -0
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts +7 -0
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.js +121 -0
- package/lib/exercises/math/trigonometry/circle/index.d.ts +7 -0
- package/lib/exercises/math/trigonometry/circle/index.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/index.js +7 -0
- package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts +10 -0
- package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.js +100 -0
- package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts +8 -0
- package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.js +97 -0
- package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts +10 -0
- package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/circle/remarkableValues.js +112 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts +7 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationCos.js +92 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts +7 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/basicEquationSin.js +104 -0
- package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.d.ts +7 -0
- package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.js +83 -0
- package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts +8 -0
- package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.js +111 -0
- package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.d.ts +8 -0
- package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.js +101 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts +6 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/index.js +6 -0
- package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.d.ts +9 -0
- package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.js +151 -0
- package/lib/exercises/math/trigonometry/index.d.ts +3 -14
- package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/index.js +3 -14
- package/lib/exercises/math/trigonometry/triangle/index.d.ts +7 -0
- package/lib/exercises/math/trigonometry/triangle/index.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/index.js +6 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometry.d.ts +10 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometry.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometry.js +207 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.d.ts +10 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +174 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.d.ts +11 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.js +224 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.d.ts +13 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.js +189 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.d.ts +13 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.js +290 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.d.ts +18 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.js +386 -0
- package/lib/exercises/pc/mathExosInPC.d.ts +2 -2
- package/lib/exercises/pc/mathExosInPC.d.ts.map +1 -1
- package/lib/exercises/pc/mathExosInPC.js +2 -2
- package/lib/exercises/vea/cartesianLineVEA.d.ts +2 -0
- package/lib/exercises/vea/cartesianLineVEA.d.ts.map +1 -0
- package/lib/exercises/vea/cartesianLineVEA.js +1 -0
- package/lib/index.d.ts +186 -27
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/line.d.ts +2 -0
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +7 -0
- package/lib/math/geometry/point.d.ts +1 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +5 -0
- package/lib/math/geometry/polygons/relationPP.d.ts +8 -0
- package/lib/math/geometry/polygons/relationPP.d.ts.map +1 -0
- package/lib/math/geometry/polygons/relationPP.js +41 -0
- package/lib/math/geometry/segment.d.ts +1 -1
- package/lib/math/geometry/vector.d.ts +2 -1
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +1 -1
- package/lib/math/numbers/reals/real.d.ts.map +1 -1
- package/lib/math/numbers/reals/real.js +2 -0
- package/lib/math/polynomials/trinom.d.ts +1 -1
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +15 -6
- package/lib/math/utils/arithmetic/primeFactors.js +1 -1
- package/lib/math/utils/geometry/randomVecs2.d.ts +6 -0
- package/lib/math/utils/geometry/randomVecs2.d.ts.map +1 -0
- package/lib/math/utils/geometry/randomVecs2.js +34 -0
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +3 -1
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +2 -2
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts +1 -0
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.js +3 -0
- package/lib/tree/nodes/functions/expNode.d.ts +1 -1
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts +2 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +17 -6
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +1 -0
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/inequations/inequationSolutionNode.js +3 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +6 -4
- package/lib/tree/nodes/operators/multiplyNode.js +1 -1
- package/lib/tree/nodes/sets/intervalNode.d.ts +6 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/namedIntervalNode.d.ts +31 -0
- package/lib/tree/nodes/sets/namedIntervalNode.d.ts.map +1 -0
- package/lib/tree/nodes/sets/namedIntervalNode.js +77 -0
- package/package.json +1 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { PointConstructor, } from "../../../../math/geometry/point.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { equal } from "../../../../tree/nodes/equations/equalNode.js";
|
|
6
|
+
import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
7
|
+
import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
|
|
8
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
9
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
10
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
11
|
+
import { square } from "../../../../tree/nodes/operators/powerNode.js";
|
|
12
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
13
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
14
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
15
|
+
const getPropositions = (n, { answer }) => {
|
|
16
|
+
const propositions = [];
|
|
17
|
+
addValidProp(propositions, answer, "raw");
|
|
18
|
+
tryToAddWrongProp(propositions, "Oui", "raw");
|
|
19
|
+
tryToAddWrongProp(propositions, "Non", "raw");
|
|
20
|
+
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
21
|
+
return shuffleProps(propositions, n);
|
|
22
|
+
};
|
|
23
|
+
const getEquation = (identifiers) => {
|
|
24
|
+
const { centreIds, radiusIds } = identifiers;
|
|
25
|
+
const radius = reifyAlgebraic(radiusIds);
|
|
26
|
+
const centre = PointConstructor.fromIdentifiers(centreIds);
|
|
27
|
+
return equal(add(square(substract("x", centre.x).simplify()), square(substract("y", centre.y).simplify())), square(radius).simplify());
|
|
28
|
+
};
|
|
29
|
+
const getAnswer = (identifiers) => {
|
|
30
|
+
const { centreIds, pointIds, radiusIds } = identifiers;
|
|
31
|
+
const point = PointConstructor.fromIdentifiers(pointIds);
|
|
32
|
+
const radius = reifyAlgebraic(radiusIds);
|
|
33
|
+
const centre = PointConstructor.fromIdentifiers(centreIds);
|
|
34
|
+
return Math.abs(point.distanceTo(centre) - radius.evaluate()) < 0.001
|
|
35
|
+
? "Oui"
|
|
36
|
+
: "Non";
|
|
37
|
+
};
|
|
38
|
+
const getInstruction = (identifiers) => {
|
|
39
|
+
const { pointIds } = identifiers;
|
|
40
|
+
const point = PointConstructor.fromIdentifiers(pointIds);
|
|
41
|
+
return `On considère le cercle $\\mathcal{C}$ d'équation :
|
|
42
|
+
|
|
43
|
+
$$
|
|
44
|
+
${getEquation(identifiers).toTex()}
|
|
45
|
+
$$
|
|
46
|
+
|
|
47
|
+
Le point $${point.toTexWithCoords()}$ appartient-il au cercle $\\mathcal{C}$ ?`;
|
|
48
|
+
};
|
|
49
|
+
const getHint = () => {
|
|
50
|
+
return `Il suffit de remplacer $x$ et $y$ par les coordonnées de $A$ dans l'équation du cercle.`;
|
|
51
|
+
};
|
|
52
|
+
const getCorrection = (identifiers) => {
|
|
53
|
+
const { centreIds, pointIds } = identifiers;
|
|
54
|
+
const centre = PointConstructor.fromIdentifiers(centreIds);
|
|
55
|
+
const point = PointConstructor.fromIdentifiers(pointIds);
|
|
56
|
+
const leftEq = add(square(substract("x", centre.x).simplify()), square(substract("y", centre.y).simplify()));
|
|
57
|
+
const leftEqDetailed = leftEq.toDetailedEvaluation({
|
|
58
|
+
x: point.x,
|
|
59
|
+
y: point.y,
|
|
60
|
+
});
|
|
61
|
+
const isOnCircle = getAnswer(identifiers) === "Oui";
|
|
62
|
+
return `On remplace $x$ et $y$ par les coordonnées de $A$ dans l'équation du cercle :
|
|
63
|
+
|
|
64
|
+
${alignTex([
|
|
65
|
+
["", leftEqDetailed.toTex()],
|
|
66
|
+
[
|
|
67
|
+
"=",
|
|
68
|
+
add(square(substract(point.x, centre.x).simplify()), square(substract(point.y, centre.y).simplify())).toTex(),
|
|
69
|
+
],
|
|
70
|
+
["=", leftEqDetailed.simplify().toTex()],
|
|
71
|
+
])}
|
|
72
|
+
|
|
73
|
+
${isOnCircle
|
|
74
|
+
? `Puisque l'égalité est bien vérifie, le point $A$ appartient bien au cercle.`
|
|
75
|
+
: `Puisque l'égalité n'est pas vérifiée, le point $A$ n'appartient pas au cercle.`}
|
|
76
|
+
`;
|
|
77
|
+
};
|
|
78
|
+
const getIsPointOnCircleFromCartesianEquationQuestion = () => {
|
|
79
|
+
const centre = PointConstructor.random("O");
|
|
80
|
+
const radius = randint(1, 10).toTree();
|
|
81
|
+
const isOnCircle = coinFlip();
|
|
82
|
+
let point;
|
|
83
|
+
if (isOnCircle) {
|
|
84
|
+
// point = PointConstructor.random("A");
|
|
85
|
+
const angle = frac(PiNode, 2);
|
|
86
|
+
const index = randint(0, 4);
|
|
87
|
+
point = centre
|
|
88
|
+
.translate(radius, 0)
|
|
89
|
+
.centralRotate(multiply(index, angle).simplify(), centre);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
do {
|
|
93
|
+
point = PointConstructor.random("A");
|
|
94
|
+
} while (Math.abs(point.distanceTo(centre) - radius.evaluate()) < 0.001);
|
|
95
|
+
}
|
|
96
|
+
const identifiers = {
|
|
97
|
+
centreIds: centre.toIdentifiers(),
|
|
98
|
+
radiusIds: radius.toIdentifiers(),
|
|
99
|
+
pointIds: point.toIdentifiers(),
|
|
100
|
+
};
|
|
101
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
102
|
+
};
|
|
103
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
104
|
+
return {
|
|
105
|
+
answer: getAnswer(identifiers),
|
|
106
|
+
instruction: getInstruction(identifiers),
|
|
107
|
+
keys: [],
|
|
108
|
+
answerFormat: "raw",
|
|
109
|
+
identifiers,
|
|
110
|
+
hint: getHint(identifiers),
|
|
111
|
+
correction: getCorrection(identifiers),
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
export const isPointOnCircleFromCartesianEquation = {
|
|
115
|
+
id: "isPointOnCircleFromCartesianEquation",
|
|
116
|
+
connector: "=",
|
|
117
|
+
label: "Déterminer si un point appartient à un cercle d'équation donnée",
|
|
118
|
+
isSingleStep: true,
|
|
119
|
+
generator: (nb, opts) => getDistinctQuestions(() => getIsPointOnCircleFromCartesianEquationQuestion(opts), nb),
|
|
120
|
+
qcmTimer: 60,
|
|
121
|
+
freeTimer: 60,
|
|
122
|
+
getPropositions,
|
|
123
|
+
subject: "Mathématiques",
|
|
124
|
+
getInstruction,
|
|
125
|
+
getHint,
|
|
126
|
+
getCorrection,
|
|
127
|
+
getAnswer,
|
|
128
|
+
getQuestionFromIdentifiers,
|
|
129
|
+
hasHintAndCorrection: true,
|
|
130
|
+
answerType: "QCU",
|
|
131
|
+
};
|
|
@@ -284,8 +284,8 @@ const getPinPointFromAxialOrCentralSymmetryQuestion = (optsIn) => {
|
|
|
284
284
|
const vecVRaw = VectorConstructor.fromPoints(point1, rotatePoint(point2, frac(PiNode, 2).evaluate(), point1, "N"));
|
|
285
285
|
const vecVUnit = vecVRaw.times(frac(1, vecVRaw.getNorm().evaluate()).evaluate().toTree());
|
|
286
286
|
const vecSrc = VectorConstructor.fromPoints(point1, pointSrc);
|
|
287
|
-
const dotAx = vecSrc.scalarProduct(vecUUnit);
|
|
288
|
-
const dotPerp = vecSrc.scalarProduct(vecVUnit);
|
|
287
|
+
const dotAx = vecSrc.scalarProduct(vecUUnit).simplify();
|
|
288
|
+
const dotPerp = vecSrc.scalarProduct(vecVUnit).simplify();
|
|
289
289
|
const vecDst = vecUUnit
|
|
290
290
|
.times(dotAx)
|
|
291
291
|
.add(vecVUnit.times(multiply(-1, dotPerp)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pinSegmentFromRotation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidian/pinSegmentFromRotation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAuK7C,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,cAAc,EAAE,eAAe,CAAC;CACjC,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"pinSegmentFromRotation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidian/pinSegmentFromRotation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAuK7C,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,cAAc,EAAE,eAAe,CAAC;CACjC,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAoYF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
|
|
@@ -246,7 +246,6 @@ const isGGBAnswerValid = (ans, { ggbAnswer, ...identifiers }) => {
|
|
|
246
246
|
}
|
|
247
247
|
return acc;
|
|
248
248
|
}, {});
|
|
249
|
-
console.log("pointsDict", pointsDict);
|
|
250
249
|
return pointsDict;
|
|
251
250
|
}
|
|
252
251
|
function getStudentSegmentsDictFromStudentCommands(commands) {
|
|
@@ -261,7 +260,6 @@ const isGGBAnswerValid = (ans, { ggbAnswer, ...identifiers }) => {
|
|
|
261
260
|
}
|
|
262
261
|
return acc;
|
|
263
262
|
}, {});
|
|
264
|
-
console.log("segmentsDict", segmentsDict);
|
|
265
263
|
return segmentsDict;
|
|
266
264
|
}
|
|
267
265
|
const isSegmentValid = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/geometry/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/geometry/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
|
|
@@ -23,7 +23,7 @@ const getSubTriangle = ({ triangle, insidePointsNames, ratio, }) => {
|
|
|
23
23
|
const getInstruction = (identifiers) => {
|
|
24
24
|
const { triangleIdentifiers, insidePointsNames } = identifiers;
|
|
25
25
|
const triangle = TriangleConstructor.fromIdentifiers(triangleIdentifiers);
|
|
26
|
-
return `En utilisant le
|
|
26
|
+
return `En utilisant le théorème de Thalès, écrire l'égalité des quotients sachant que $\\left(${insidePointsNames.join("")}\\right)//\\left(${triangle.sides[2].toInsideName()}\\right)$.`;
|
|
27
27
|
};
|
|
28
28
|
const getAnswer = (identifiers) => {
|
|
29
29
|
const { triangleIdentifiers, insidePointsNames, isPapillon, ratio } = identifiers;
|
|
@@ -244,7 +244,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
|
244
244
|
export const thalesCalcul = {
|
|
245
245
|
id: "thalesCalcul",
|
|
246
246
|
connector: "=",
|
|
247
|
-
label: "Utiliser le
|
|
247
|
+
label: "Utiliser le théorème de Thalès pour calculer un côté",
|
|
248
248
|
isSingleStep: true,
|
|
249
249
|
generator: (nb, opts) => getDistinctQuestions(() => getThalesFindSideQuestion(opts), nb),
|
|
250
250
|
qcmTimer: 60,
|
|
@@ -75,7 +75,7 @@ const getPropositions = (n, { answer, ...identifiers }) => {
|
|
|
75
75
|
const propositions = [];
|
|
76
76
|
addValidProp(propositions, answer);
|
|
77
77
|
const { u, v } = getVectors(identifiers);
|
|
78
|
-
tryToAddWrongProp(propositions, u.scalarProduct(v).toTex());
|
|
78
|
+
tryToAddWrongProp(propositions, u.scalarProduct(v).simplify().toTex());
|
|
79
79
|
propWhile(propositions, n, () => {
|
|
80
80
|
const wrongAnswer = randint(-20, 20) + "";
|
|
81
81
|
tryToAddWrongProp(propositions, wrongAnswer);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/alKashi/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC"}
|
package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../../../exercises/exercise.js";
|
|
2
|
+
import { TriangleIdentifiers } from "../../../../../../math/geometry/triangles/triangle.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
triangleIds: TriangleIdentifiers;
|
|
5
|
+
indexAngle: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const scalarProductAlKashiAngle: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=scalarProductAlKashiAngle.d.ts.map
|
package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalarProductAlKashiAngle.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAEL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAkBnD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,mBAAmB,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAmSF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAoB3D,CAAC"}
|
package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, } from "../../../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { GeogebraConstructor } from "../../../../../../geogebra/geogebraConstructor.js";
|
|
4
|
+
import { TriangleConstructor, } from "../../../../../../math/geometry/triangles/triangle.js";
|
|
5
|
+
import { randfloat } from "../../../../../../math/utils/random/randfloat.js";
|
|
6
|
+
import { randint } from "../../../../../../math/utils/random/randint.js";
|
|
7
|
+
import { round } from "../../../../../../math/utils/round.js";
|
|
8
|
+
import { arccos } from "../../../../../../tree/nodes/functions/arccosNode.js";
|
|
9
|
+
import { PiNode } from "../../../../../../tree/nodes/numbers/piNode.js";
|
|
10
|
+
import { add } from "../../../../../../tree/nodes/operators/addNode.js";
|
|
11
|
+
import { frac } from "../../../../../../tree/nodes/operators/fractionNode.js";
|
|
12
|
+
import { multiply } from "../../../../../../tree/nodes/operators/multiplyNode.js";
|
|
13
|
+
import { power } from "../../../../../../tree/nodes/operators/powerNode.js";
|
|
14
|
+
import { substract } from "../../../../../../tree/nodes/operators/substractNode.js";
|
|
15
|
+
import { parseAlgebraic } from "../../../../../../tree/parsers/latexParser.js";
|
|
16
|
+
import { probaFlip } from "../../../../../../utils/alea/probaFlip.js";
|
|
17
|
+
import { arrayRotation } from "../../../../../../utils/arrays/rotation.js";
|
|
18
|
+
import { handleVEAError } from "../../../../../../utils/errors/handleVEAError.js";
|
|
19
|
+
const precision = 2;
|
|
20
|
+
const getHydrated = (identifiers) => {
|
|
21
|
+
const { triangleIds, indexAngle } = identifiers;
|
|
22
|
+
const triangle = TriangleConstructor.fromIdentifiers(triangleIds);
|
|
23
|
+
const sides = arrayRotation(triangle.sides, indexAngle);
|
|
24
|
+
const angleNames = arrayRotation(triangle.angles, indexAngle).map((angle) => angle.toTexMini());
|
|
25
|
+
return {
|
|
26
|
+
triangle,
|
|
27
|
+
sides,
|
|
28
|
+
angleNames,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const getInstruction = (identifiers) => {
|
|
32
|
+
const { indexAngle } = identifiers;
|
|
33
|
+
const { triangle } = getHydrated(identifiers);
|
|
34
|
+
return `Soit $${triangle.name}$ un triangle dont on connaît les longueurs des côtés :
|
|
35
|
+
|
|
36
|
+
${triangle.sides.map((segment) => `- $${segment.toInsideName()} = ${segment.getLength().frenchify()}$`).join(`
|
|
37
|
+
|
|
38
|
+
`)}
|
|
39
|
+
|
|
40
|
+
Combien l'angle $${triangle.angles[indexAngle].toTexMini()}$ mesure-t-il ?
|
|
41
|
+
Donner une valeur approchée en degrés avec $${precision}$ décimales.`;
|
|
42
|
+
};
|
|
43
|
+
const getAnswerStuff = (identifiers) => {
|
|
44
|
+
const { sides } = getHydrated(identifiers);
|
|
45
|
+
const nodeCosAngle = frac(substract(add(power(sides[1].getLengthNode(), 2), power(sides[2].getLengthNode(), 2)), power(sides[0].getLengthNode(), 2)), multiply(2, multiply(sides[1].getLengthNode(), sides[2].getLengthNode())));
|
|
46
|
+
const nodeAngleInRadians = arccos(nodeCosAngle);
|
|
47
|
+
const nodeAngleInDegrees = multiply(nodeAngleInRadians, frac(180, PiNode));
|
|
48
|
+
return {
|
|
49
|
+
nodeCosAngle,
|
|
50
|
+
nodeAngleInRadians,
|
|
51
|
+
nodeAngleInDegrees,
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
const getAnswerNode = (identifiers) => {
|
|
55
|
+
return getAnswerStuff(identifiers).nodeAngleInDegrees;
|
|
56
|
+
};
|
|
57
|
+
const getAnswer = (identifiers) => {
|
|
58
|
+
return round(getAnswerNode(identifiers).evaluate(), precision).frenchify();
|
|
59
|
+
};
|
|
60
|
+
const getHint = (identifiers) => {
|
|
61
|
+
const { angleNames } = getHydrated(identifiers);
|
|
62
|
+
return `Applique le théorème d'Al Kashi dans le triangle $ABC$ pour l'angle $${angleNames[0]}$.`;
|
|
63
|
+
};
|
|
64
|
+
const getCorrection = (identifiers) => {
|
|
65
|
+
const { indexAngle } = identifiers;
|
|
66
|
+
const { sides, angleNames } = getHydrated(identifiers);
|
|
67
|
+
const sideNames = arrayRotation(sides, indexAngle)
|
|
68
|
+
.map((segment) => segment.toInsideName())
|
|
69
|
+
.map((name) => {
|
|
70
|
+
return {
|
|
71
|
+
AB: "c",
|
|
72
|
+
AC: "b",
|
|
73
|
+
BC: "a",
|
|
74
|
+
}[name];
|
|
75
|
+
});
|
|
76
|
+
const nodeCosAngle = frac(substract(add(power(sideNames[1], 2), power(sideNames[2], 2)), power(sideNames[0], 2)), multiply(2, multiply(sideNames[1], sideNames[2])));
|
|
77
|
+
const nodeAngle = arccos(nodeCosAngle);
|
|
78
|
+
return `On applique le théorème d'Al Kashi dans le triangle $ABC$.
|
|
79
|
+
|
|
80
|
+
On utilise les notations suivantes :
|
|
81
|
+
|
|
82
|
+
$$
|
|
83
|
+
a \\ = \\ BC \\ ; \\ b \\ = \\ AC \\ ; \\ c \\ = \\ AB \\
|
|
84
|
+
$$
|
|
85
|
+
|
|
86
|
+
$$
|
|
87
|
+
${sideNames[0]}^2 = ${sideNames[1]}^2 + ${sideNames[2]}^2 - 2 ${sideNames[1]} ${sideNames[2]} \\cos(${angleNames[0]})
|
|
88
|
+
$$
|
|
89
|
+
|
|
90
|
+
$$
|
|
91
|
+
\\cos(${angleNames[0]}) = ${nodeCosAngle.toTex()}
|
|
92
|
+
$$
|
|
93
|
+
|
|
94
|
+
En radians :
|
|
95
|
+
|
|
96
|
+
$$
|
|
97
|
+
${angleNames[0]} = ${nodeAngle.toTex()}
|
|
98
|
+
$$
|
|
99
|
+
|
|
100
|
+
Il ne faut pas oublier de passer en degrés :
|
|
101
|
+
|
|
102
|
+
$$
|
|
103
|
+
${angleNames[0]}_{deg} = ${angleNames[0]}_{rad} \\times \\frac{180}{${PiNode.toTex()}}
|
|
104
|
+
$$
|
|
105
|
+
|
|
106
|
+
On arrondit à la toute fin :
|
|
107
|
+
|
|
108
|
+
$$
|
|
109
|
+
${angleNames[0]} \\approx ${getAnswer(identifiers)} {}^{\\circ}
|
|
110
|
+
$$
|
|
111
|
+
|
|
112
|
+
`;
|
|
113
|
+
};
|
|
114
|
+
//too helpful for student ?
|
|
115
|
+
const getGGBOptions = (identifiers) => {
|
|
116
|
+
const { triangle } = getHydrated(identifiers);
|
|
117
|
+
// const { indexAngle } = identifiers;
|
|
118
|
+
// const angle = arrayRotation(triangle.angles, indexAngle)[0];
|
|
119
|
+
const ggb = new GeogebraConstructor({
|
|
120
|
+
commands: [
|
|
121
|
+
//triangle
|
|
122
|
+
...triangle.commands,
|
|
123
|
+
// //angle
|
|
124
|
+
// `Ang = Angle(${angle.points
|
|
125
|
+
// .reverse()
|
|
126
|
+
// .map((point) => point.name)
|
|
127
|
+
// .join(",")})`,
|
|
128
|
+
// `ShowLabel(Ang, false)`,
|
|
129
|
+
],
|
|
130
|
+
hideAxes: true,
|
|
131
|
+
});
|
|
132
|
+
return ggb.getOptions({
|
|
133
|
+
coords: ggb.getCoordsForPoints(triangle.points),
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
137
|
+
const propositions = [];
|
|
138
|
+
addValidProp(propositions, answer);
|
|
139
|
+
const { indexAngle } = identifiers;
|
|
140
|
+
const { sides } = getHydrated(identifiers);
|
|
141
|
+
const answerStuff = getAnswerStuff(identifiers);
|
|
142
|
+
//student: cos value
|
|
143
|
+
{
|
|
144
|
+
const valueCos = answerStuff.nodeCosAngle.evaluate();
|
|
145
|
+
if (valueCos > 0) {
|
|
146
|
+
tryToAddWrongProp(propositions, round(valueCos, precision).frenchify());
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
//student: radians instead of degrees
|
|
150
|
+
{
|
|
151
|
+
tryToAddWrongProp(propositions, round(answerStuff.nodeAngleInRadians.evaluate(), precision).frenchify());
|
|
152
|
+
}
|
|
153
|
+
//student: sign error when getting cos
|
|
154
|
+
{
|
|
155
|
+
const nodeCosAngle = frac(substract(add(power(sides[1].getLengthNode(), 2), power(sides[2].getLengthNode(), 2)), power(sides[0].getLengthNode(), 2)), multiply(-2, multiply(sides[1].getLengthNode(), sides[2].getLengthNode())));
|
|
156
|
+
const nodeAngleInRadians = arccos(nodeCosAngle);
|
|
157
|
+
const nodeAngleInDegrees = multiply(nodeAngleInRadians, frac(180, PiNode));
|
|
158
|
+
tryToAddWrongProp(propositions, round(nodeAngleInDegrees.evaluate(), precision).frenchify());
|
|
159
|
+
}
|
|
160
|
+
//student: wrong angle
|
|
161
|
+
{
|
|
162
|
+
[0, 1, 2]
|
|
163
|
+
.filter((i) => i !== indexAngle)
|
|
164
|
+
.forEach((indexAngleWrong) => {
|
|
165
|
+
const identifiersWrong = Object.assign({}, identifiers, {
|
|
166
|
+
indexAngle: indexAngleWrong,
|
|
167
|
+
});
|
|
168
|
+
const texAnswerWrong = getAnswer(identifiersWrong);
|
|
169
|
+
tryToAddWrongProp(propositions, texAnswerWrong);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
//terror: around answer, _most of the time_
|
|
173
|
+
{
|
|
174
|
+
const value = (() => {
|
|
175
|
+
if (probaFlip(0.71)) {
|
|
176
|
+
return answerStuff.nodeAngleInDegrees.evaluate();
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
const indexAngleWrong = randint(0, 3, [indexAngle]);
|
|
180
|
+
const identifiersWrong = Object.assign({}, identifiers, {
|
|
181
|
+
indexAngle: indexAngleWrong,
|
|
182
|
+
});
|
|
183
|
+
return getAnswerNode(identifiersWrong).evaluate();
|
|
184
|
+
}
|
|
185
|
+
})();
|
|
186
|
+
[...Array(4).keys()].forEach(() => {
|
|
187
|
+
const valueAnswerOffsetted = value + randfloat(-7, 7, 2, [0]);
|
|
188
|
+
tryToAddWrongProp(propositions, round(valueAnswerOffsetted, precision).frenchify());
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
propWhile(propositions, n, () => {
|
|
192
|
+
tryToAddWrongProp(propositions, randfloat(0, 180, 2, [0, 180]).frenchify());
|
|
193
|
+
});
|
|
194
|
+
return shuffleProps(propositions, n);
|
|
195
|
+
};
|
|
196
|
+
const getKeys = () => {
|
|
197
|
+
return [];
|
|
198
|
+
};
|
|
199
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
200
|
+
try {
|
|
201
|
+
const parsed = parseAlgebraic(ans);
|
|
202
|
+
return parsed.simplify().toTex() === answer;
|
|
203
|
+
}
|
|
204
|
+
catch (err) {
|
|
205
|
+
return handleVEAError(err);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const getScalarProductAlKashiAngleQuestion = () => {
|
|
209
|
+
const triangle = TriangleConstructor.randomNiceSides({});
|
|
210
|
+
const indexAngle = randint(0, 3);
|
|
211
|
+
const identifiers = {
|
|
212
|
+
triangleIds: triangle.toIdentifiers(),
|
|
213
|
+
indexAngle,
|
|
214
|
+
};
|
|
215
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
216
|
+
};
|
|
217
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
218
|
+
return {
|
|
219
|
+
answer: getAnswer(identifiers),
|
|
220
|
+
instruction: getInstruction(identifiers),
|
|
221
|
+
keys: getKeys(identifiers),
|
|
222
|
+
answerFormat: "tex",
|
|
223
|
+
identifiers,
|
|
224
|
+
hint: getHint(identifiers),
|
|
225
|
+
correction: getCorrection(identifiers),
|
|
226
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
export const scalarProductAlKashiAngle = {
|
|
230
|
+
id: "scalarProductAlKashiAngle",
|
|
231
|
+
connector: "=",
|
|
232
|
+
label: "Connaissant les longueurs des trois côtés d'un triangle, calculer un angle",
|
|
233
|
+
isSingleStep: true,
|
|
234
|
+
generator: (nb, opts) => getDistinctQuestions(() => getScalarProductAlKashiAngleQuestion(opts), nb),
|
|
235
|
+
qcmTimer: 60,
|
|
236
|
+
freeTimer: 60,
|
|
237
|
+
getPropositions,
|
|
238
|
+
isAnswerValid,
|
|
239
|
+
subject: "Mathématiques",
|
|
240
|
+
getInstruction,
|
|
241
|
+
getHint,
|
|
242
|
+
getCorrection,
|
|
243
|
+
hasHintAndCorrection: true,
|
|
244
|
+
getAnswer,
|
|
245
|
+
getQuestionFromIdentifiers,
|
|
246
|
+
hasGeogebra: true,
|
|
247
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Exercise } from "../../../../../../exercises/exercise.js";
|
|
2
|
+
import { PointIdentifiers } from "../../../../../../math/geometry/point.js";
|
|
3
|
+
import { TriangleIdentifiers } from "../../../../../../math/geometry/triangles/triangle.js";
|
|
4
|
+
type Identifiers = {
|
|
5
|
+
triangleIds: TriangleIdentifiers;
|
|
6
|
+
pointIdsH: PointIdentifiers;
|
|
7
|
+
};
|
|
8
|
+
type Options = {
|
|
9
|
+
sectorOfPointH: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const scalarProductAlKashiBH: Exercise<Identifiers, Options>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=scalarProductAlKashiBH.d.ts.map
|
package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalarProductAlKashiBH.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAGL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAsBnD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,mBAAmB,CAAC;IACjC,SAAS,EAAE,gBAAgB,CAAC;CAC7B,CAAC;AAggBF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAsBF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CA2BjE,CAAC"}
|