math-exercises 1.3.31 → 1.3.32
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/README.md +73 -73
- package/lib/exercises/calcul/addAndSub.d.ts +6 -6
- package/lib/exercises/calcul/addAndSub.js +41 -41
- package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts +6 -6
- package/lib/exercises/calcul/addAndSubWithoutRelatives.js +51 -51
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +37 -37
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +34 -34
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +34 -34
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.js +69 -69
- package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionsDivision.js +31 -31
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionsProduct.js +30 -30
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionsSum.js +30 -30
- package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +3 -3
- package/lib/exercises/calcul/fractions/simplifyFraction.js +26 -26
- package/lib/exercises/calcul/mentalCaluls.ts/mentalAddAndSub.d.ts +3 -3
- package/lib/exercises/calcul/mentalCaluls.ts/mentalAddAndSub.js +46 -46
- package/lib/exercises/calcul/mentalCaluls.ts/mentalDivisions.d.ts +3 -3
- package/lib/exercises/calcul/mentalCaluls.ts/mentalDivisions.js +64 -64
- package/lib/exercises/calcul/mentalCaluls.ts/mentalMultiplications.d.ts +3 -3
- package/lib/exercises/calcul/mentalCaluls.ts/mentalMultiplications.js +51 -51
- package/lib/exercises/calcul/mentalCaluls.ts/mentalPercentage.d.ts +3 -3
- package/lib/exercises/calcul/mentalCaluls.ts/mentalPercentage.js +67 -67
- package/lib/exercises/calcul/operations/operationsPriorities.d.ts +10 -10
- package/lib/exercises/calcul/operations/operationsPriorities.js +100 -100
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +10 -10
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +181 -181
- package/lib/exercises/calcul/operationsPriorities.js +88 -0
- package/lib/exercises/calcul/rounding/rounding.d.ts +19 -19
- package/lib/exercises/calcul/rounding/rounding.js +87 -87
- package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/allIdentities.js +27 -27
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +32 -32
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +33 -33
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +34 -34
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +34 -34
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +33 -33
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts +3 -3
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +47 -47
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +39 -39
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +42 -42
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +43 -43
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +45 -45
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts +3 -3
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +30 -30
- package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.d.ts +3 -3
- package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.js +32 -32
- package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts +4 -0
- package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/fractionEquation.js +39 -0
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts +4 -0
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.js +39 -0
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts +3 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +34 -34
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts +3 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +35 -35
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts +3 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +34 -34
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +40 -40
- package/lib/exercises/conversion/aeraConversion.d.ts +3 -3
- package/lib/exercises/conversion/aeraConversion.js +32 -32
- package/lib/exercises/conversion/capacityConversion.d.ts +3 -3
- package/lib/exercises/conversion/capacityConversion.js +30 -30
- package/lib/exercises/conversion/lengthConversion.d.ts +3 -3
- package/lib/exercises/conversion/lengthConversion.js +30 -30
- package/lib/exercises/conversion/massConversion.d.ts +3 -3
- package/lib/exercises/conversion/massConversion.js +30 -30
- package/lib/exercises/conversion/volumeCapacityConversion.d.ts +3 -3
- package/lib/exercises/conversion/volumeCapacityConversion.js +47 -47
- package/lib/exercises/conversion/volumeConversion.d.ts +3 -3
- package/lib/exercises/conversion/volumeConversion.js +32 -32
- package/lib/exercises/derivation/derivative/affineDerivative.d.ts +4 -0
- package/lib/exercises/derivation/derivative/affineDerivative.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/affineDerivative.js +27 -0
- package/lib/exercises/derivation/derivative/constanteDerivative.d.ts +3 -3
- package/lib/exercises/derivation/derivative/constanteDerivative.js +27 -27
- package/lib/exercises/derivation/derivative/firstDegreeDerivative.d.ts +3 -3
- package/lib/exercises/derivation/derivative/firstDegreeDerivative.js +29 -29
- package/lib/exercises/derivation/derivative/inverseFunctionDerivative.d.ts +3 -3
- package/lib/exercises/derivation/derivative/inverseFunctionDerivative.js +27 -27
- package/lib/exercises/derivation/derivative/powerFunctionDerivative.d.ts +3 -3
- package/lib/exercises/derivation/derivative/powerFunctionDerivative.js +35 -35
- package/lib/exercises/derivation/derivative/rootFunctionDerivative.d.ts +3 -3
- package/lib/exercises/derivation/derivative/rootFunctionDerivative.js +40 -40
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts +3 -3
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.js +30 -30
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts +3 -3
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.js +33 -33
- package/lib/exercises/derivation/derivative/thridDegreeDerivative.d.ts +1 -0
- package/lib/exercises/derivation/derivative/thridDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/thridDegreeDerivative.js +1 -0
- package/lib/exercises/derivation/derivative/usualderivative.d.ts +3 -3
- package/lib/exercises/derivation/derivative/usualderivative.js +36 -36
- package/lib/exercises/exercise.d.ts +21 -21
- package/lib/exercises/exercise.js +7 -7
- package/lib/exercises/exercises.d.ts +1 -1
- package/lib/exercises/exercises.d.ts.map +1 -1
- package/lib/exercises/exercises.js +224 -198
- package/lib/exercises/geometry/cartesian/derivativeNumberReading.d.ts +3 -3
- package/lib/exercises/geometry/cartesian/derivativeNumberReading.js +51 -51
- package/lib/exercises/geometry/cartesian/derivativeNumberReading2.js +91 -91
- package/lib/exercises/geometry/cartesian/leadingCoefficient.d.ts +3 -3
- package/lib/exercises/geometry/cartesian/leadingCoefficient.js +60 -60
- package/lib/exercises/geometry/cartesian/leadingCoefficientCalculV1.d.ts +4 -0
- package/lib/exercises/geometry/cartesian/leadingCoefficientCalculV1.d.ts.map +1 -0
- package/lib/exercises/geometry/cartesian/leadingCoefficientCalculV1.js +30 -0
- package/lib/exercises/geometry/cartesian/leadingCoefficientCalculV2.d.ts +4 -0
- package/lib/exercises/geometry/cartesian/leadingCoefficientCalculV2.d.ts.map +1 -0
- package/lib/exercises/geometry/cartesian/leadingCoefficientCalculV2.js +29 -0
- package/lib/exercises/geometry/cartesian/midpoint.d.ts +3 -3
- package/lib/exercises/geometry/cartesian/midpoint.js +31 -31
- package/lib/exercises/geometry/euclidean/TriangleArea.d.ts +4 -0
- package/lib/exercises/geometry/euclidean/TriangleArea.d.ts.map +1 -0
- package/lib/exercises/geometry/euclidean/TriangleArea.js +53 -0
- package/lib/exercises/geometry/euclidean/pythagore.d.ts +4 -0
- package/lib/exercises/geometry/euclidean/pythagore.d.ts.map +1 -0
- package/lib/exercises/geometry/euclidean/pythagore.js +31 -0
- package/lib/exercises/geometry/euclidean/pythagoreCalcul.d.ts +4 -0
- package/lib/exercises/geometry/euclidean/pythagoreCalcul.d.ts.map +1 -0
- package/lib/exercises/geometry/euclidean/pythagoreCalcul.js +60 -0
- package/lib/exercises/geometry/euclidean/rightTriangleArea.d.ts +4 -0
- package/lib/exercises/geometry/euclidean/rightTriangleArea.d.ts.map +1 -0
- package/lib/exercises/geometry/euclidean/rightTriangleArea.js +39 -0
- package/lib/exercises/geometry/euclidean/thales.d.ts +4 -0
- package/lib/exercises/geometry/euclidean/thales.d.ts.map +1 -0
- package/lib/exercises/geometry/euclidean/thales.js +67 -0
- package/lib/exercises/geometry/euclidean/thalesCalcul.d.ts +4 -0
- package/lib/exercises/geometry/euclidean/thalesCalcul.d.ts.map +1 -0
- package/lib/exercises/geometry/euclidean/thalesCalcul.js +104 -0
- package/lib/exercises/geometry/euclidean/trigonometry.d.ts +4 -0
- package/lib/exercises/geometry/euclidean/trigonometry.d.ts.map +1 -0
- package/lib/exercises/geometry/euclidean/trigonometry.js +55 -0
- package/lib/exercises/geometry/euclidean/trigonometryAngleCalcul.d.ts +4 -0
- package/lib/exercises/geometry/euclidean/trigonometryAngleCalcul.d.ts.map +1 -0
- package/lib/exercises/geometry/euclidean/trigonometryAngleCalcul.js +42 -0
- package/lib/exercises/geometry/euclidean/trigonometrySideCalcul.d.ts +4 -0
- package/lib/exercises/geometry/euclidean/trigonometrySideCalcul.d.ts.map +1 -0
- package/lib/exercises/geometry/euclidean/trigonometrySideCalcul.js +52 -0
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +3 -3
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +30 -30
- package/lib/exercises/geometry/vectors/scalarProductViaNorms.js +27 -27
- package/lib/exercises/percent/applyPercent.d.ts +3 -3
- package/lib/exercises/percent/applyPercent.js +41 -41
- package/lib/exercises/percent/averageEvolutionRate.d.ts +3 -3
- package/lib/exercises/percent/averageEvolutionRate.js +30 -30
- package/lib/exercises/percent/globalPercent.d.ts +3 -3
- package/lib/exercises/percent/globalPercent.js +44 -44
- package/lib/exercises/percent/reciprocalPercentage.d.ts +3 -3
- package/lib/exercises/percent/reciprocalPercentage.js +32 -32
- package/lib/exercises/powers/powersDivision.d.ts +7 -7
- package/lib/exercises/powers/powersDivision.js +46 -46
- package/lib/exercises/powers/powersOfTenToDecimal.d.ts +6 -6
- package/lib/exercises/powers/powersOfTenToDecimal.js +34 -34
- package/lib/exercises/powers/powersPower.d.ts +7 -7
- package/lib/exercises/powers/powersPower.js +45 -45
- package/lib/exercises/powers/powersProduct.d.ts +7 -7
- package/lib/exercises/powers/powersProduct.js +46 -46
- package/lib/exercises/powers/scientificToDecimal.d.ts +6 -6
- package/lib/exercises/powers/scientificToDecimal.js +39 -39
- package/lib/exercises/proba/conditionalProbability.d.ts +3 -3
- package/lib/exercises/proba/conditionalProbability.js +74 -74
- package/lib/exercises/proba/marginalAndConditionalFrequency.d.ts +3 -3
- package/lib/exercises/proba/marginalAndConditionalFrequency.js +81 -81
- package/lib/exercises/proba/probabilityTree.d.ts +3 -3
- package/lib/exercises/proba/probabilityTree.js +105 -105
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts +3 -3
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +31 -31
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts +3 -3
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.js +31 -31
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts +3 -3
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.js +31 -31
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts +3 -3
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +30 -30
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts +3 -3
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +30 -30
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts +3 -3
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.js +40 -40
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +36 -36
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +35 -35
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricFindReason.js +31 -31
- package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricReasonUsage.js +30 -30
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts +7 -7
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +30 -30
- package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +3 -3
- package/lib/exercises/squareRoots/simpifySquareRoot.js +29 -29
- package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +3 -3
- package/lib/exercises/trigonometry/mainRemarkableValues.js +30 -30
- package/lib/exercises/trigonometry/remarkableValues.d.ts +3 -3
- package/lib/exercises/trigonometry/remarkableValues.js +30 -30
- package/lib/exercises/utils/getDistinctQuestions.d.ts +3 -3
- package/lib/exercises/utils/getDistinctQuestions.js +28 -28
- package/lib/geometry/point.js +27 -0
- package/lib/geometry/vector.js +31 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +6 -6
- package/lib/math/geometry/droite.d.ts +19 -19
- package/lib/math/geometry/droite.d.ts.map +1 -1
- package/lib/math/geometry/droite.js +62 -61
- package/lib/math/geometry/point.d.ts +29 -25
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +55 -40
- package/lib/math/geometry/triangles.d.ts +54 -0
- package/lib/math/geometry/triangles.d.ts.map +1 -0
- package/lib/math/geometry/triangles.js +183 -0
- package/lib/math/geometry/vector.d.ts +15 -15
- package/lib/math/geometry/vector.js +31 -31
- package/lib/math/numbers/decimals/decimal.d.ts +24 -24
- package/lib/math/numbers/decimals/decimal.js +140 -140
- package/lib/math/numbers/epsilon.d.ts +1 -1
- package/lib/math/numbers/epsilon.js +10 -10
- package/lib/math/numbers/integer/integer.d.ts +14 -14
- package/lib/math/numbers/integer/integer.js +68 -68
- package/lib/math/numbers/integer/power.d.ts +13 -13
- package/lib/math/numbers/integer/power.js +52 -52
- package/lib/math/numbers/nombre.d.ts +13 -13
- package/lib/math/numbers/nombre.js +10 -10
- package/lib/math/numbers/rationals/rational.d.ts +25 -25
- package/lib/math/numbers/rationals/rational.js +113 -113
- package/lib/math/numbers/reals/real.d.ts +9 -9
- package/lib/math/numbers/reals/real.js +16 -16
- package/lib/math/numbers/reals/squareRoot.d.ts +18 -18
- package/lib/math/numbers/reals/squareRoot.js +63 -63
- package/lib/math/polynomials/affine.d.ts +15 -15
- package/lib/math/polynomials/affine.js +42 -42
- package/lib/math/polynomials/polynomial.d.ts +25 -25
- package/lib/math/polynomials/polynomial.js +131 -131
- package/lib/math/sequences/arithmeticSequence.js +1 -1
- package/lib/math/sequences/geometricSequence.d.ts +3 -3
- package/lib/math/sequences/geometricSequence.js +8 -8
- package/lib/math/sequences/sequence.d.ts +22 -22
- package/lib/math/sequences/sequence.js +21 -21
- package/lib/math/sets/discreteSet.d.ts +10 -10
- package/lib/math/sets/discreteSet.js +28 -28
- package/lib/math/sets/emptySet.js +6 -6
- package/lib/math/sets/intervals/intervals.d.ts +26 -26
- package/lib/math/sets/intervals/intervals.js +104 -104
- package/lib/math/sets/mathSet.d.ts +7 -7
- package/lib/math/sets/mathSet.js +10 -10
- package/lib/math/sets/mathSetInterface.d.ts +5 -5
- package/lib/math/sets/mathSetInterface.js +2 -2
- package/lib/math/trigonometry/remarkableValue.d.ts +10 -10
- package/lib/math/trigonometry/remarkableValue.js +29 -29
- package/lib/math/trigonometry/remarkableValues.d.ts +2 -2
- package/lib/math/trigonometry/remarkableValues.js +51 -51
- package/lib/math/utils/arithmetic/coprimesOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/coprimesOf.js +13 -13
- package/lib/math/utils/arithmetic/dividersOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/dividersOf.js +12 -12
- package/lib/math/utils/arithmetic/gcd.d.ts +1 -1
- package/lib/math/utils/arithmetic/gcd.js +7 -7
- package/lib/math/utils/arithmetic/isSquare.d.ts +1 -1
- package/lib/math/utils/arithmetic/isSquare.js +7 -7
- package/lib/math/utils/arithmetic/lcd.d.ts +1 -1
- package/lib/math/utils/arithmetic/lcd.js +12 -12
- package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/nonCoprimesOf.js +13 -13
- package/lib/math/utils/arithmetic/nonDividersOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/nonDividersOf.js +14 -14
- package/lib/math/utils/arithmetic/primeFactors.d.ts +5 -5
- package/lib/math/utils/arithmetic/primeFactors.js +22 -22
- package/lib/math/utils/decimals/decimalPartLengthOf.d.ts +1 -1
- package/lib/math/utils/decimals/decimalPartLengthOf.js +14 -14
- package/lib/math/utils/random/randTupleInt.d.ts +13 -13
- package/lib/math/utils/random/randTupleInt.js +30 -30
- package/lib/math/utils/random/randint.d.ts +4 -4
- package/lib/math/utils/random/randint.js +18 -18
- package/lib/math/utils/round.d.ts +1 -1
- package/lib/math/utils/round.js +8 -8
- package/lib/mathutils/arithmetic/coprimesOf.js +13 -0
- package/lib/mathutils/arithmetic/dividersOf.js +12 -0
- package/lib/mathutils/arithmetic/gcd.js +7 -0
- package/lib/mathutils/arithmetic/isSquare.js +7 -0
- package/lib/mathutils/arithmetic/lcd.js +12 -0
- package/lib/mathutils/arithmetic/nonCoprimesOf.js +13 -0
- package/lib/mathutils/arithmetic/nonDividersOf.js +14 -0
- package/lib/mathutils/arithmetic/primeFactors.js +22 -0
- package/lib/mathutils/decimals/decimalPartLengthOf.js +14 -0
- package/lib/mathutils/random/randTupleInt.js +30 -0
- package/lib/mathutils/random/randint.js +18 -0
- package/lib/mathutils/round.js +8 -0
- package/lib/numbers/decimals/decimal.js +140 -0
- package/lib/numbers/epsilon.js +10 -0
- package/lib/numbers/integer/integer.js +68 -0
- package/lib/numbers/integer/power.js +52 -0
- package/lib/numbers/nombre.js +10 -0
- package/lib/numbers/rationals/rational.js +113 -0
- package/lib/numbers/reals/real.js +16 -0
- package/lib/numbers/reals/squareRoot.js +63 -0
- package/lib/polynomials/affine.js +42 -0
- package/lib/polynomials/polynomial.js +125 -0
- package/lib/server.d.ts +1 -1
- package/lib/server.js +53 -53
- package/lib/sets/discreteSet.js +28 -0
- package/lib/sets/emptySet.js +6 -0
- package/lib/sets/intervals/intervals.js +108 -0
- package/lib/sets/intervals/union.js +1 -0
- package/lib/sets/mathSet.js +10 -0
- package/lib/sets/mathSetInterface.js +2 -0
- package/lib/tree/nodes/functions/cosNode.d.ts +9 -9
- package/lib/tree/nodes/functions/cosNode.js +21 -21
- package/lib/tree/nodes/functions/functionNode.d.ts +14 -14
- package/lib/tree/nodes/functions/functionNode.js +20 -20
- package/lib/tree/nodes/functions/oppositeNode.d.ts +7 -7
- package/lib/tree/nodes/functions/oppositeNode.js +26 -26
- package/lib/tree/nodes/functions/sinNode.js +1 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts +8 -8
- package/lib/tree/nodes/functions/sqrtNode.js +18 -18
- package/lib/tree/nodes/node.d.ts +12 -12
- package/lib/tree/nodes/node.js +11 -11
- package/lib/tree/nodes/numbers/constantNode.d.ts +9 -9
- package/lib/tree/nodes/numbers/constantNode.js +18 -18
- package/lib/tree/nodes/numbers/numberNode.d.ts +10 -10
- package/lib/tree/nodes/numbers/numberNode.js +19 -19
- package/lib/tree/nodes/numbers/piNode.d.ts +2 -2
- package/lib/tree/nodes/numbers/piNode.js +5 -5
- package/lib/tree/nodes/operators/addNode.d.ts +7 -7
- package/lib/tree/nodes/operators/addNode.js +19 -19
- package/lib/tree/nodes/operators/divideNode.d.ts +11 -11
- package/lib/tree/nodes/operators/divideNode.js +34 -34
- package/lib/tree/nodes/operators/equalNode.d.ts +7 -7
- package/lib/tree/nodes/operators/equalNode.js +16 -16
- package/lib/tree/nodes/operators/fractionNode.d.ts +11 -11
- package/lib/tree/nodes/operators/fractionNode.js +20 -20
- package/lib/tree/nodes/operators/multiplyNode.d.ts +7 -7
- package/lib/tree/nodes/operators/multiplyNode.js +43 -43
- package/lib/tree/nodes/operators/operatorNode.d.ts +21 -21
- package/lib/tree/nodes/operators/operatorNode.js +35 -35
- package/lib/tree/nodes/operators/powerNode.d.ts +7 -7
- package/lib/tree/nodes/operators/powerNode.js +33 -33
- package/lib/tree/nodes/operators/substractNode.d.ts +7 -7
- package/lib/tree/nodes/operators/substractNode.js +24 -24
- package/lib/tree/nodes/variables/variableNode.d.ts +8 -8
- package/lib/tree/nodes/variables/variableNode.js +19 -19
- package/lib/tree/parsers/derivateParser.js +62 -62
- package/lib/tree/parsers/latexParser.js +110 -0
- package/lib/tree/parsers/simplify.d.ts +2 -2
- package/lib/tree/parsers/simplify.js +52 -52
- package/lib/utils/arrayEqual.d.ts +1 -1
- package/lib/utils/arrayEqual.js +13 -13
- package/lib/utils/coin.js +7 -0
- package/lib/utils/coinFlip.d.ts +1 -1
- package/lib/utils/coinFlip.js +7 -7
- package/lib/utils/random.d.ts +1 -1
- package/lib/utils/random.js +7 -7
- package/lib/utils/shuffle.d.ts +1 -1
- package/lib/utils/shuffle.js +15 -15
- package/package.json +50 -50
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPythagoreCalcul = exports.pythagoreCalcul = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const triangles_1 = require("../../../math/geometry/triangles");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
8
|
+
const shuffle_1 = require("../../../utils/shuffle");
|
|
9
|
+
exports.pythagoreCalcul = {
|
|
10
|
+
id: 'pythagoreCalcul',
|
|
11
|
+
connector: '=',
|
|
12
|
+
instruction: '',
|
|
13
|
+
label: 'Utiliser le théoreme de Pythagore pour faire des calculs',
|
|
14
|
+
levels: ['3', '2'],
|
|
15
|
+
isSingleStep: false,
|
|
16
|
+
section: 'Géométrie euclidienne',
|
|
17
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPythagoreCalcul, nb),
|
|
18
|
+
};
|
|
19
|
+
function getPythagoreCalcul() {
|
|
20
|
+
const vertices = [];
|
|
21
|
+
const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
|
|
22
|
+
for (let i = 0; i < 3; i++)
|
|
23
|
+
vertices.push(String.fromCharCode(code + i));
|
|
24
|
+
const triangle = triangles_1.TriangleConstructor.createRandomRightTriangle({ minRapport: 0.7, maxRapport: 1.3, names: vertices });
|
|
25
|
+
const sides = [triangle.getSideCName(), triangle.getSideBName(), triangle.getSideAName()];
|
|
26
|
+
const sideLengths = [triangle.getSideCnumber(), triangle.getSideBnumber(), triangle.getSideAnumber()].map((el) => Math.round(el / 2));
|
|
27
|
+
const zeroOrOne = (0, shuffle_1.shuffle)([0, 1]);
|
|
28
|
+
const randoms = (0, coinFlip_1.coinFlip)() ? [...zeroOrOne, 2] : [2, ...zeroOrOne];
|
|
29
|
+
// le but est d'avoir une chance sur 2 d'avoir un hépoténus et une 1 chance sur 2 d'avoir un a des 2 autres cote
|
|
30
|
+
let answer;
|
|
31
|
+
if (randoms[2] === 2) {
|
|
32
|
+
// cas de l'hypoténus
|
|
33
|
+
answer = Math.hypot(sideLengths[0], sideLengths[1]);
|
|
34
|
+
answer = Math.round(answer) === answer ? answer : `\\sqrt{${sideLengths[0] ** 2 + sideLengths[1] ** 2}}`;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
// les deux autres cotés
|
|
38
|
+
answer = Math.sqrt(Math.abs(sideLengths[randoms[0]] ** 2 - sideLengths[randoms[1]] ** 2));
|
|
39
|
+
answer =
|
|
40
|
+
Math.round(answer) === answer
|
|
41
|
+
? answer
|
|
42
|
+
: `\\sqrt{${Math.abs(sideLengths[randoms[0]] ** 2 - sideLengths[randoms[1]] ** 2)}}`;
|
|
43
|
+
}
|
|
44
|
+
const commands = [
|
|
45
|
+
...triangle.generateCommands({
|
|
46
|
+
showLabels: [...sides, sides[randoms[2]]],
|
|
47
|
+
setCaptions: [...sideLengths.map((el) => el + ''), '?'],
|
|
48
|
+
highlightedSide: sides[randoms[2]],
|
|
49
|
+
}),
|
|
50
|
+
];
|
|
51
|
+
const question = {
|
|
52
|
+
instruction: `Dans le triangle ${triangle.getTriangleName()} ci-dessous rectangle en ${triangle.getRightAngle()}, on sait que ${sides[randoms[0]]} = $${sideLengths[randoms[0]]}$ et que ${sides[randoms[1]]} = $${sideLengths[randoms[1]]}$.$\\\\$Calculer la longueur exacte ${sides[randoms[2]]}`,
|
|
53
|
+
answer: answer + '',
|
|
54
|
+
keys: [...vertices, 'equal'],
|
|
55
|
+
commands,
|
|
56
|
+
coords: triangle.generateCoords(),
|
|
57
|
+
};
|
|
58
|
+
return question;
|
|
59
|
+
}
|
|
60
|
+
exports.getPythagoreCalcul = getPythagoreCalcul;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rightTriangleArea.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/rightTriangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,iBAAiB,EAAE,QAS/B,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,CA2B/C"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRightTriangleArea = exports.rightTriangleArea = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const triangles_1 = require("../../../math/geometry/triangles");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
exports.rightTriangleArea = {
|
|
8
|
+
id: 'rightTriangleArea',
|
|
9
|
+
connector: '=',
|
|
10
|
+
instruction: '',
|
|
11
|
+
label: "Calculer l'aire d'un triangle rectangle",
|
|
12
|
+
levels: ['4', '3', '2'],
|
|
13
|
+
isSingleStep: false,
|
|
14
|
+
section: 'Géométrie euclidienne',
|
|
15
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getRightTriangleArea, nb),
|
|
16
|
+
};
|
|
17
|
+
function getRightTriangleArea() {
|
|
18
|
+
const vertices = [];
|
|
19
|
+
const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
|
|
20
|
+
for (let i = 0; i < 3; i++)
|
|
21
|
+
vertices.push(String.fromCharCode(code + i));
|
|
22
|
+
const triangle = triangles_1.TriangleConstructor.createRandomRightTriangle({ minRapport: 0.4, maxRapport: 1.6, names: vertices });
|
|
23
|
+
const sidesLength = [Math.round(triangle.getSideBnumber() / 2), Math.round(triangle.getSideCnumber() / 2)];
|
|
24
|
+
const commands = [
|
|
25
|
+
...triangle.generateCommands({
|
|
26
|
+
showLabels: [triangle.getSideBName(), triangle.getSideCName()],
|
|
27
|
+
setCaptions: [sidesLength[0] + '', sidesLength[1] + ''],
|
|
28
|
+
}),
|
|
29
|
+
];
|
|
30
|
+
const question = {
|
|
31
|
+
instruction: `Calculer l'aire du triangle ${triangle.getTriangleName()} rectangle en ${triangle.getRightAngle()} sachant que ${triangle.getSideBName()} = $${sidesLength[0]}$ cm et ${triangle.getSideCName()} = $${sidesLength[1]}$ cm.`,
|
|
32
|
+
answer: (sidesLength[0] * sidesLength[1]) / 2 + '',
|
|
33
|
+
keys: [...vertices, 'equal', 'cm2'],
|
|
34
|
+
commands,
|
|
35
|
+
coords: triangle.generateCoords(),
|
|
36
|
+
};
|
|
37
|
+
return question;
|
|
38
|
+
}
|
|
39
|
+
exports.getRightTriangleArea = getRightTriangleArea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thales.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/thales.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI9D,eAAO,MAAM,MAAM,EAAE,QASpB,CAAC;AAEF,wBAAgB,SAAS,IAAI,QAAQ,CAyDpC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getThales = exports.thales = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
exports.thales = {
|
|
7
|
+
id: 'thales',
|
|
8
|
+
connector: '=',
|
|
9
|
+
instruction: '',
|
|
10
|
+
label: "Ecrire l'égalité de Thalès",
|
|
11
|
+
levels: ['5', '4', '3', '2'],
|
|
12
|
+
isSingleStep: false,
|
|
13
|
+
section: 'Géométrie euclidienne',
|
|
14
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getThales, nb),
|
|
15
|
+
};
|
|
16
|
+
function getThales() {
|
|
17
|
+
const vertices = [];
|
|
18
|
+
const code = 65 + (0, randint_1.randint)(0, 22); // Générer un code de caractère majuscule aléatoire (A-Z)
|
|
19
|
+
for (let i = 0; i < 5; i++)
|
|
20
|
+
vertices.push(String.fromCharCode(code + i));
|
|
21
|
+
const [xA, yA] = [(0, randint_1.randint)(-10, 11), (0, randint_1.randint)(-10, 11)];
|
|
22
|
+
let xB, yB, xC, yC;
|
|
23
|
+
let d1, d2; // distance entre le point A et B
|
|
24
|
+
let theta = 0; // angle entre AB et AC
|
|
25
|
+
do {
|
|
26
|
+
[xB, yB, xC, yC] = [(0, randint_1.randint)(-10, 11), (0, randint_1.randint)(-10, 11), (0, randint_1.randint)(-10, 11), (0, randint_1.randint)(-10, 11)];
|
|
27
|
+
d1 = Math.hypot(xB - xA, yB - yA); // Calculer la distance entre A et B
|
|
28
|
+
d2 = Math.hypot(xC - xA, yC - yA); // Calculer la distance entre A et C
|
|
29
|
+
theta = Math.acos(((xB - xA) * (xC - xA) + (yB - yA) * (yC - yA)) / (d1 * d2));
|
|
30
|
+
} while (!theta || theta < 0.35 || theta > 2.1 || d1 / d2 > 1.3 || d1 / d2 < 0.7);
|
|
31
|
+
const factor = (0, randint_1.randint)(-5, 6, [-2, -1, 0, 1, 2]) / 10; // facteur = AB/AE, Pour que l'affichage soit acceptable, les valeurs de factor sont +- 0.5 0.4 0.3
|
|
32
|
+
const [xD, yD] = [xA + factor * (xB - xA), yA + factor * (yB - yA)];
|
|
33
|
+
const [xE, yE] = [xA + factor * (xC - xA), yA + factor * (yC - yA)];
|
|
34
|
+
const xMin = Math.min(xA, xB, xC, xD, xE);
|
|
35
|
+
const xMax = Math.max(xA, xB, xC, xD, xE);
|
|
36
|
+
const yMin = Math.min(yA, yB, yC, yD, yE);
|
|
37
|
+
const yMax = Math.max(yA, yB, yC, yD, yE);
|
|
38
|
+
const commands = [
|
|
39
|
+
`${vertices[0]} = Point({${xA}, ${yA}})`,
|
|
40
|
+
`${vertices[1]} = Point({${xB}, ${yB}})`,
|
|
41
|
+
`${vertices[2]} = Point({${xC}, ${yC}})`,
|
|
42
|
+
`${vertices[3]} = Point(${vertices[0]}, Vector(${factor}Vector(${vertices[0]},${vertices[1]})))`,
|
|
43
|
+
`${vertices[4]} = Intersect(Line(${vertices[3]}, Line(${vertices[1]}, ${vertices[2]})) , Line(${vertices[0]}, ${vertices[2]}))`,
|
|
44
|
+
`l = Segment(${vertices[0]}, ${vertices[1]})`,
|
|
45
|
+
`i = Segment(${vertices[0]}, ${vertices[2]})`,
|
|
46
|
+
`j = Segment(${vertices[1]}, ${vertices[2]})`,
|
|
47
|
+
`k = Segment(${vertices[3]}, ${vertices[4]})`,
|
|
48
|
+
`If(${factor} < 0, Segment(${vertices[0]}, ${vertices[3]}))`,
|
|
49
|
+
`If(${factor} < 0, Segment(${vertices[0]}, ${vertices[4]}))`,
|
|
50
|
+
`ShowAxes(false)`,
|
|
51
|
+
`ShowGrid(false)`,
|
|
52
|
+
`ShowLabel(${vertices[0]}, true)`,
|
|
53
|
+
`ShowLabel(${vertices[1]}, true)`,
|
|
54
|
+
`ShowLabel(${vertices[2]}, true)`,
|
|
55
|
+
`ShowLabel(${vertices[3]}, true)`,
|
|
56
|
+
`ShowLabel(${vertices[4]}, true)`,
|
|
57
|
+
];
|
|
58
|
+
const question = {
|
|
59
|
+
instruction: `En utilisant le théoreme de Thalès, Écrire l'égalité des quotients sachant que :$\\\\$ (${vertices[3]}${vertices[4]})//(${vertices[1]}${vertices[2]})`,
|
|
60
|
+
answer: `\\frac{${vertices[0]}${vertices[3]}}{${vertices[0]}${vertices[1]}} = \\frac{${vertices[0]}${vertices[4]}}{${vertices[0]}${vertices[2]}} = \\frac{${vertices[3]}${vertices[4]}}{${vertices[1]}${vertices[2]}}`,
|
|
61
|
+
keys: [...vertices, 'equal'],
|
|
62
|
+
commands,
|
|
63
|
+
coords: [xMin - 1, xMax + 1, yMin - 1, yMax + 1],
|
|
64
|
+
};
|
|
65
|
+
return question;
|
|
66
|
+
}
|
|
67
|
+
exports.getThales = getThales;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC;AAEF,wBAAgB,SAAS,IAAI,QAAQ,CAgHpC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getThales = exports.thalesCalcul = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
7
|
+
const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
|
|
8
|
+
const simplify_1 = require("../../../tree/parsers/simplify");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
exports.thalesCalcul = {
|
|
11
|
+
id: 'thalesCalcul',
|
|
12
|
+
connector: '=',
|
|
13
|
+
instruction: '',
|
|
14
|
+
label: 'Utiliser le théoreme de Thalès pour faire des calculs',
|
|
15
|
+
levels: ['5', '4', '3', '2'],
|
|
16
|
+
isSingleStep: false,
|
|
17
|
+
section: 'Géométrie euclidienne',
|
|
18
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getThales, nb),
|
|
19
|
+
};
|
|
20
|
+
function getThales() {
|
|
21
|
+
const vertices = [];
|
|
22
|
+
const code = 65 + (0, randint_1.randint)(0, 22); // Générer un code de caractère majuscule aléatoire (A-Z)
|
|
23
|
+
for (let i = 0; i < 5; i++)
|
|
24
|
+
vertices.push(String.fromCharCode(code + i));
|
|
25
|
+
const [xA, yA] = [(0, randint_1.randint)(-10, 11), (0, randint_1.randint)(-10, 11)];
|
|
26
|
+
let xB, yB, xC, yC;
|
|
27
|
+
let d1, d2, d3; // distance entre le point A et B
|
|
28
|
+
let theta = 0; // angle entre AB et AC
|
|
29
|
+
do {
|
|
30
|
+
[xB, yB, xC, yC] = [(0, randint_1.randint)(-10, 11), (0, randint_1.randint)(-10, 11), (0, randint_1.randint)(-10, 11), (0, randint_1.randint)(-10, 11)];
|
|
31
|
+
d1 = Math.hypot(xB - xA, yB - yA); // Calculer la distance entre A et B
|
|
32
|
+
d2 = Math.hypot(xC - xA, yC - yA); // Calculer la distance entre A et C
|
|
33
|
+
theta = Math.acos(((xB - xA) * (xC - xA) + (yB - yA) * (yC - yA)) / (d1 * d2));
|
|
34
|
+
} while (!theta || theta < 0.35 || theta > 2.1 || d1 / d2 > 1.3 || d1 / d2 < 0.7);
|
|
35
|
+
d3 = Math.sqrt(d1 ** 2 + d2 ** 2 - 2 * d1 * d2 * Math.cos(theta)); // Calculer la distance entre C et B
|
|
36
|
+
// CB² = AB² * AC² - 2*AB*AC*cos(theta) : pythagore généralisé
|
|
37
|
+
const factor = (0, randint_1.randint)(-5, 6, [-2, -1, 0, 1, 2]) / 10; // facteur = AB/AE, Pour que l'affichage soit acceptable, les valeurs de factor sont +- 0.5 0.4 0.3
|
|
38
|
+
const [xD, yD] = [xA + factor * (xB - xA), yA + factor * (yB - yA)];
|
|
39
|
+
const [xE, yE] = [xA + factor * (xC - xA), yA + factor * (yC - yA)];
|
|
40
|
+
const xMin = Math.min(xA, xB, xC, xD, xE);
|
|
41
|
+
const xMax = Math.max(xA, xB, xC, xD, xE);
|
|
42
|
+
const yMin = Math.min(yA, yB, yC, yD, yE);
|
|
43
|
+
const yMax = Math.max(yA, yB, yC, yD, yE);
|
|
44
|
+
// AB AC BC AD AE
|
|
45
|
+
const sides = [
|
|
46
|
+
`${vertices[0]}${vertices[1]}`,
|
|
47
|
+
`${vertices[0]}${vertices[3]}`,
|
|
48
|
+
`${vertices[0]}${vertices[2]}`,
|
|
49
|
+
`${vertices[0]}${vertices[4]}`,
|
|
50
|
+
`${vertices[1]}${vertices[2]}`,
|
|
51
|
+
`${vertices[3]}${vertices[4]}`,
|
|
52
|
+
];
|
|
53
|
+
// round pour avoir des valeurs dans N tout en gardant les proportions pour que ça soit cohérent. sides[i] a pour longueur sideLengths[i]
|
|
54
|
+
const sideLengths = [d1, factor * d1, d2, factor * d2, d3, factor * d3].map((el) => Math.round(Math.abs(el)));
|
|
55
|
+
const rand = (0, randint_1.randint)(0, 3);
|
|
56
|
+
let rand2 = (0, randint_1.randint)(0, 3, [rand]);
|
|
57
|
+
if (sideLengths[2 * rand] === sideLengths[2 * rand2])
|
|
58
|
+
rand2 = (0, randint_1.randint)(0, 3, [rand, rand2]); // condition pour pas prendre 2 longueurs identiques
|
|
59
|
+
let instruction = `Dans la figure ci-dessous, nous avons (${vertices[3]}${vertices[4]})//(${vertices[1]}${vertices[2]}), `;
|
|
60
|
+
let statement;
|
|
61
|
+
let startStatement;
|
|
62
|
+
if ((0, coinFlip_1.coinFlip)()) {
|
|
63
|
+
// a/b = c/d on cherche c
|
|
64
|
+
instruction += `${sides[2 * rand]} = $${sideLengths[2 * rand]}$, ${sides[2 * rand + 1]} = $${sideLengths[2 * rand + 1]}$, ${sides[2 * rand2]} = $${sideLengths[2 * rand2]}$.$\\\\$Déterminer ${sides[2 * rand2 + 1]}`;
|
|
65
|
+
startStatement = `${sides[2 * rand2 + 1]}`;
|
|
66
|
+
statement = (0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(sideLengths[2 * rand2] * sideLengths[2 * rand + 1]), new numberNode_1.NumberNode(sideLengths[2 * rand])));
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
// a/b = c/d on cherche d
|
|
70
|
+
instruction += `${sides[2 * rand]} = $${sideLengths[2 * rand]}$, ${sides[2 * rand + 1]} = $${sideLengths[2 * rand + 1]}$, ${sides[2 * rand2 + 1]} = $${sideLengths[2 * rand2 + 1]}$.$\\\\$Déterminer ${sides[2 * rand2]}`;
|
|
71
|
+
startStatement = `${sides[2 * rand2]}`;
|
|
72
|
+
statement = (0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(sideLengths[2 * rand2 + 1] * sideLengths[2 * rand]), new numberNode_1.NumberNode(sideLengths[2 * rand + 1])));
|
|
73
|
+
}
|
|
74
|
+
const commands = [
|
|
75
|
+
`${vertices[0]} = Point({${xA}, ${yA}})`,
|
|
76
|
+
`${vertices[1]} = Point({${xB}, ${yB}})`,
|
|
77
|
+
`${vertices[2]} = Point({${xC}, ${yC}})`,
|
|
78
|
+
`${vertices[3]} = Point(${vertices[0]}, Vector(${factor}Vector(${vertices[0]},${vertices[1]})))`,
|
|
79
|
+
`${vertices[4]} = Intersect(Line(${vertices[3]}, Line(${vertices[1]}, ${vertices[2]})) , Line(${vertices[0]}, ${vertices[2]}))`,
|
|
80
|
+
`l = Segment(${vertices[0]}, ${vertices[1]})`,
|
|
81
|
+
`i = Segment(${vertices[0]}, ${vertices[2]})`,
|
|
82
|
+
`j = Segment(${vertices[1]}, ${vertices[2]})`,
|
|
83
|
+
`k = Segment(${vertices[3]}, ${vertices[4]})`,
|
|
84
|
+
`If(${factor} < 0, Segment(${vertices[0]}, ${vertices[3]}))`,
|
|
85
|
+
`If(${factor} < 0, Segment(${vertices[0]}, ${vertices[4]}))`,
|
|
86
|
+
`ShowAxes(false)`,
|
|
87
|
+
`ShowGrid(false)`,
|
|
88
|
+
`ShowLabel(${vertices[0]}, true)`,
|
|
89
|
+
`ShowLabel(${vertices[1]}, true)`,
|
|
90
|
+
`ShowLabel(${vertices[2]}, true)`,
|
|
91
|
+
`ShowLabel(${vertices[3]}, true)`,
|
|
92
|
+
`ShowLabel(${vertices[4]}, true)`,
|
|
93
|
+
];
|
|
94
|
+
const question = {
|
|
95
|
+
instruction,
|
|
96
|
+
startStatement,
|
|
97
|
+
answer: statement.toTex(),
|
|
98
|
+
keys: [],
|
|
99
|
+
commands,
|
|
100
|
+
coords: [xMin - 1, xMax + 1, yMin - 1, yMax + 1],
|
|
101
|
+
};
|
|
102
|
+
return question;
|
|
103
|
+
}
|
|
104
|
+
exports.getThales = getThales;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigonometry.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/trigonometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC;AAEF,wBAAgB,eAAe,IAAI,QAAQ,CA2C1C"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTrigonometry = exports.trigonometry = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const triangles_1 = require("../../../math/geometry/triangles");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
exports.trigonometry = {
|
|
8
|
+
id: 'trigonometry',
|
|
9
|
+
connector: '=',
|
|
10
|
+
instruction: '',
|
|
11
|
+
label: "Écrire le quotient égal au cosinus, au sinus ou à la tangente d'un angle dans un triangle rectangle",
|
|
12
|
+
levels: ['4', '3', '2'],
|
|
13
|
+
isSingleStep: false,
|
|
14
|
+
section: 'Géométrie euclidienne',
|
|
15
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getTrigonometry, nb),
|
|
16
|
+
};
|
|
17
|
+
function getTrigonometry() {
|
|
18
|
+
const vertices = [];
|
|
19
|
+
const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
|
|
20
|
+
for (let i = 0; i < 3; i++)
|
|
21
|
+
vertices.push(String.fromCharCode(code + i));
|
|
22
|
+
const triangle = triangles_1.TriangleConstructor.createRandomRightTriangle({ minRapport: 0.7, maxRapport: 1.3, names: vertices });
|
|
23
|
+
const trigo = ['le cosinus', 'le sinus', 'la tangente'];
|
|
24
|
+
const randTrigo = (0, randint_1.randint)(0, 3);
|
|
25
|
+
const angle = [triangle.vertexB.name, triangle.vertexC.name];
|
|
26
|
+
const randAngle = (0, randint_1.randint)(0, 2);
|
|
27
|
+
let quotient;
|
|
28
|
+
switch (randAngle) {
|
|
29
|
+
case 0:
|
|
30
|
+
quotient = [
|
|
31
|
+
`\\frac{${triangle.getSideCName()}}{${triangle.getSideAName()}}`,
|
|
32
|
+
`\\frac{${triangle.getSideBName()}}{${triangle.getSideAName()}}`,
|
|
33
|
+
`\\frac{${triangle.getSideBName()}}{${triangle.getSideCName()}}`,
|
|
34
|
+
];
|
|
35
|
+
break;
|
|
36
|
+
case 1:
|
|
37
|
+
quotient = [
|
|
38
|
+
`\\frac{${triangle.getSideBName()}}{${triangle.getSideAName()}}`,
|
|
39
|
+
`\\frac{${triangle.getSideCName()}}{${triangle.getSideAName()}}`,
|
|
40
|
+
`\\frac{${triangle.getSideCName()}}{${triangle.getSideBName()}}`,
|
|
41
|
+
];
|
|
42
|
+
break;
|
|
43
|
+
default:
|
|
44
|
+
quotient = [''];
|
|
45
|
+
}
|
|
46
|
+
const question = {
|
|
47
|
+
instruction: `À quel quotient est égal ${trigo[randTrigo]} de l'angle $\\widehat{${angle[randAngle]}}$?`,
|
|
48
|
+
answer: quotient[randTrigo],
|
|
49
|
+
keys: [...vertices, 'equal'],
|
|
50
|
+
commands: [...triangle.generateCommands({ highlightedAngle: angle[randAngle] })],
|
|
51
|
+
coords: triangle.generateCoords(),
|
|
52
|
+
};
|
|
53
|
+
return question;
|
|
54
|
+
}
|
|
55
|
+
exports.getTrigonometry = getTrigonometry;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigonometryAngleCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/trigonometryAngleCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,uBAAuB,EAAE,QASrC,CAAC;AAEF,wBAAgB,0BAA0B,IAAI,QAAQ,CAoCrD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTrigonometryAngleCalcul = exports.trigonometryAngleCalcul = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const triangles_1 = require("../../../math/geometry/triangles");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const round_1 = require("../../../math/utils/round");
|
|
8
|
+
const shuffle_1 = require("../../../utils/shuffle");
|
|
9
|
+
exports.trigonometryAngleCalcul = {
|
|
10
|
+
id: 'trigonometryAngleCalcul',
|
|
11
|
+
connector: '=',
|
|
12
|
+
instruction: '',
|
|
13
|
+
label: 'Utiliser la trigonométrie pour calculer un angle',
|
|
14
|
+
levels: ['4', '3', '2'],
|
|
15
|
+
isSingleStep: false,
|
|
16
|
+
section: 'Géométrie euclidienne',
|
|
17
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getTrigonometryAngleCalcul, nb),
|
|
18
|
+
};
|
|
19
|
+
function getTrigonometryAngleCalcul() {
|
|
20
|
+
const vertices = [];
|
|
21
|
+
const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
|
|
22
|
+
for (let i = 0; i < 3; i++)
|
|
23
|
+
vertices.push(String.fromCharCode(code + i));
|
|
24
|
+
const triangle = triangles_1.TriangleConstructor.createRandomRightTriangle({ minRapport: 0.5, maxRapport: 1.5, names: vertices });
|
|
25
|
+
const sides = [triangle.getSideCName(), triangle.getSideBName(), triangle.getSideAName()];
|
|
26
|
+
const sideLengths = [triangle.getSideCnumber(), triangle.getSideBnumber(), triangle.getSideAnumber()].map((el) => (0, round_1.round)(el / 2, 2));
|
|
27
|
+
const angle = [triangle.vertexB.name, triangle.vertexC.name];
|
|
28
|
+
const randAngle = (0, randint_1.randint)(0, 2);
|
|
29
|
+
const randSides = (0, shuffle_1.shuffle)([0, 1, 2]);
|
|
30
|
+
const answer = randAngle === 0
|
|
31
|
+
? Math.round((Math.acos(sideLengths[0] / sideLengths[2]) * 180) / Math.PI)
|
|
32
|
+
: Math.round((Math.acos(sideLengths[1] / sideLengths[2]) * 180) / Math.PI);
|
|
33
|
+
const question = {
|
|
34
|
+
instruction: `Le triangle ${triangle.getTriangleName()} rectangle en ${triangle.getRightAngle()} est tel que ${sides[randSides[0]]} = $${sideLengths[randSides[0]]}$ cm et ${sides[randSides[1]]} = $${sideLengths[randSides[1]]}$ cm.$\\\\$ Calculer $\\widehat{${angle[randAngle]}}$ à 1° près.`,
|
|
35
|
+
answer: answer + '°',
|
|
36
|
+
keys: [...vertices, 'equal', '°', 'cos', 'sin', 'tan', 'arccos', 'arcsin', 'arctan'],
|
|
37
|
+
commands: [...triangle.generateCommands({ highlightedAngle: angle[randAngle] })],
|
|
38
|
+
coords: triangle.generateCoords(),
|
|
39
|
+
};
|
|
40
|
+
return question;
|
|
41
|
+
}
|
|
42
|
+
exports.getTrigonometryAngleCalcul = getTrigonometryAngleCalcul;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigonometrySideCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/trigonometrySideCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAM9D,eAAO,MAAM,sBAAsB,EAAE,QASpC,CAAC;AAEF,wBAAgB,yBAAyB,IAAI,QAAQ,CA+CpD"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTrigonometrySideCalcul = exports.trigonometrySideCalcul = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const triangles_1 = require("../../../math/geometry/triangles");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const round_1 = require("../../../math/utils/round");
|
|
8
|
+
exports.trigonometrySideCalcul = {
|
|
9
|
+
id: 'trigonometrySideCalcul',
|
|
10
|
+
connector: '=',
|
|
11
|
+
instruction: '',
|
|
12
|
+
label: 'Utiliser la trigonométrie pour calculer un côté',
|
|
13
|
+
levels: ['4', '3', '2'],
|
|
14
|
+
isSingleStep: false,
|
|
15
|
+
section: 'Géométrie euclidienne',
|
|
16
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getTrigonometrySideCalcul, nb),
|
|
17
|
+
};
|
|
18
|
+
function getTrigonometrySideCalcul() {
|
|
19
|
+
const vertices = [];
|
|
20
|
+
const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
|
|
21
|
+
for (let i = 0; i < 3; i++)
|
|
22
|
+
vertices.push(String.fromCharCode(code + i));
|
|
23
|
+
const triangle = triangles_1.TriangleConstructor.createRandomRightTriangle({ minRapport: 0.5, maxRapport: 1.5, names: vertices });
|
|
24
|
+
const sides = [triangle.getSideCName(), triangle.getSideBName(), triangle.getSideAName()];
|
|
25
|
+
const sideLengths = [triangle.getSideCnumber(), triangle.getSideBnumber(), triangle.getSideAnumber()].map((el) => (0, round_1.round)(el / 2, 2));
|
|
26
|
+
const angle = [triangle.vertexB.name, triangle.vertexC.name];
|
|
27
|
+
const randAngle = (0, randint_1.randint)(0, 2);
|
|
28
|
+
const randside = (0, randint_1.randint)(0, 3); // valeurs possible : 0 1 2
|
|
29
|
+
const randsideQuestion = (0, randint_1.randint)(0, 3, [randside]); // si rand = 0, valeurs possible 1 2
|
|
30
|
+
const angleValue = [
|
|
31
|
+
(0, round_1.round)((Math.acos(sideLengths[0] / sideLengths[2]) * 180) / Math.PI, 1),
|
|
32
|
+
(0, round_1.round)((Math.acos(sideLengths[1] / sideLengths[2]) * 180) / Math.PI, 1),
|
|
33
|
+
];
|
|
34
|
+
const commands = [
|
|
35
|
+
...triangle.generateCommands({
|
|
36
|
+
highlightedAngle: angle[randAngle],
|
|
37
|
+
colorHighlightedAngle: 'Black',
|
|
38
|
+
showLabels: [sides[randsideQuestion]],
|
|
39
|
+
setCaptions: ['?'],
|
|
40
|
+
highlightedSide: sides[randsideQuestion],
|
|
41
|
+
}),
|
|
42
|
+
];
|
|
43
|
+
const question = {
|
|
44
|
+
instruction: `Le triangle ${triangle.getTriangleName()} rectangle en ${triangle.getRightAngle()} tel que ${sides[randside]} = $${sideLengths[randside]}$ cm et $\\widehat{${angle[randAngle]}}$ = $${angleValue[randAngle]}$°.$\\\\$ Calculer ${sides[randsideQuestion]} à $0,1$ cm près.`,
|
|
45
|
+
answer: `${(0, round_1.round)(sideLengths[randsideQuestion], 1)}`,
|
|
46
|
+
keys: [...vertices, 'equal', '°', 'cos', 'sin', 'tan', 'arccos', 'arcsin', 'arctan'],
|
|
47
|
+
commands,
|
|
48
|
+
coords: triangle.generateCoords(),
|
|
49
|
+
};
|
|
50
|
+
return question;
|
|
51
|
+
}
|
|
52
|
+
exports.getTrigonometrySideCalcul = getTrigonometrySideCalcul;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Exercise, Question } from '../../../exercises/exercise';
|
|
2
|
-
export declare const scalarProductViaCoords: Exercise;
|
|
3
|
-
export declare function getScalarProductViaCoordsQuestion(): Question;
|
|
1
|
+
import { Exercise, Question } from '../../../exercises/exercise';
|
|
2
|
+
export declare const scalarProductViaCoords: Exercise;
|
|
3
|
+
export declare function getScalarProductViaCoordsQuestion(): Question;
|
|
4
4
|
//# sourceMappingURL=scalarProductViaCoords.d.ts.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getScalarProductViaCoordsQuestion = exports.scalarProductViaCoords = void 0;
|
|
4
|
-
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
-
const vector_1 = require("../../../math/geometry/vector");
|
|
6
|
-
const randTupleInt_1 = require("../../../math/utils/random/randTupleInt");
|
|
7
|
-
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
8
|
-
exports.scalarProductViaCoords = {
|
|
9
|
-
id: 'scalarProductViaCoords',
|
|
10
|
-
connector: '=',
|
|
11
|
-
instruction: '',
|
|
12
|
-
isSingleStep: false,
|
|
13
|
-
label: "Calculer un produit scalaire à l'aide des coordonnées",
|
|
14
|
-
levels: ['1, 0'],
|
|
15
|
-
section: 'Vecteurs',
|
|
16
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScalarProductViaCoordsQuestion, nb),
|
|
17
|
-
keys: [],
|
|
18
|
-
};
|
|
19
|
-
function getScalarProductViaCoordsQuestion() {
|
|
20
|
-
const [coords1, coords2] = (0, randTupleInt_1.distinctRandTupleInt)(2, 2, { from: -9, to: 10 });
|
|
21
|
-
const u = new vector_1.Vector('u', new numberNode_1.NumberNode(coords1[0]), new numberNode_1.NumberNode(coords1[1]));
|
|
22
|
-
const v = new vector_1.Vector('v', new numberNode_1.NumberNode(coords2[0]), new numberNode_1.NumberNode(coords2[1]));
|
|
23
|
-
return {
|
|
24
|
-
instruction: `Soit $${u.toTexWithCoords()}$ et $${v.toTexWithCoords()}$. Calculer $${u.toTex()}\\cdot ${v.toTex()}$.`,
|
|
25
|
-
startStatement: `${u.toTex()}\\cdot ${v.toTex()}`,
|
|
26
|
-
answer: u.scalarProduct(v).toTex(),
|
|
27
|
-
keys: [],
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
exports.getScalarProductViaCoordsQuestion = getScalarProductViaCoordsQuestion;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getScalarProductViaCoordsQuestion = exports.scalarProductViaCoords = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const vector_1 = require("../../../math/geometry/vector");
|
|
6
|
+
const randTupleInt_1 = require("../../../math/utils/random/randTupleInt");
|
|
7
|
+
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
8
|
+
exports.scalarProductViaCoords = {
|
|
9
|
+
id: 'scalarProductViaCoords',
|
|
10
|
+
connector: '=',
|
|
11
|
+
instruction: '',
|
|
12
|
+
isSingleStep: false,
|
|
13
|
+
label: "Calculer un produit scalaire à l'aide des coordonnées",
|
|
14
|
+
levels: ['1, 0'],
|
|
15
|
+
section: 'Vecteurs',
|
|
16
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScalarProductViaCoordsQuestion, nb),
|
|
17
|
+
keys: [],
|
|
18
|
+
};
|
|
19
|
+
function getScalarProductViaCoordsQuestion() {
|
|
20
|
+
const [coords1, coords2] = (0, randTupleInt_1.distinctRandTupleInt)(2, 2, { from: -9, to: 10 });
|
|
21
|
+
const u = new vector_1.Vector('u', new numberNode_1.NumberNode(coords1[0]), new numberNode_1.NumberNode(coords1[1]));
|
|
22
|
+
const v = new vector_1.Vector('v', new numberNode_1.NumberNode(coords2[0]), new numberNode_1.NumberNode(coords2[1]));
|
|
23
|
+
return {
|
|
24
|
+
instruction: `Soit $${u.toTexWithCoords()}$ et $${v.toTexWithCoords()}$. Calculer $${u.toTex()}\\cdot ${v.toTex()}$.`,
|
|
25
|
+
startStatement: `${u.toTex()}\\cdot ${v.toTex()}`,
|
|
26
|
+
answer: u.scalarProduct(v).toTex(),
|
|
27
|
+
keys: [],
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
exports.getScalarProductViaCoordsQuestion = getScalarProductViaCoordsQuestion;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { Vector } from "../../../geometry/vector";
|
|
3
|
-
// import { distinctRandTupleInt } from "../../../mathutils/random/randTupleInt";
|
|
4
|
-
// import { NumberNode } from "../../../tree/nodes/numbers/numberNode";
|
|
5
|
-
// import { latexParser } from "../../../tree/parsers/latexParser";
|
|
6
|
-
// import { Exercise, Question } from "../../exercise";
|
|
7
|
-
// import { getDistinctQuestions } from "../../utils/getDistinctQuestions";
|
|
8
|
-
// export const scalarProductViaNorms : Exercise = {
|
|
9
|
-
// id: 'scalarProductViaNorms',
|
|
10
|
-
// connector: "=",
|
|
11
|
-
// instruction: "",
|
|
12
|
-
// isSingleStep: false,
|
|
13
|
-
// label: "Calculer un produit scalaire à l'aide des normes.",
|
|
14
|
-
// levels: ["1, 0"],
|
|
15
|
-
// section: "vectors",
|
|
16
|
-
// generator: (nb: number) => getDistinctQuestions(getScalarProductViaNormsQuestion, nb)
|
|
17
|
-
// }
|
|
18
|
-
// export function getScalarProductViaNormsQuestion(): Question {
|
|
19
|
-
// const [coords1, coords2] = distinctRandTupleInt(2, 2, {from: -9, to: 10})
|
|
20
|
-
// const u = new Vector("u", new NumberNode(coords1[0]), new NumberNode(coords1[1]))
|
|
21
|
-
// const v = new Vector("v", new NumberNode(coords2[0]), new NumberNode(coords2[1]))
|
|
22
|
-
// return {
|
|
23
|
-
// instruction: `Soit ${u.toTexWithCoords()} et ${v.toTexWithCoords()}. Calculer ${u.toTex()}\\cdot ${v.toTex()}.`,
|
|
24
|
-
// startStatement: `${u.toTex()}\\cdot ${v.toTex()}`,
|
|
25
|
-
// answer: latexParser(u.scalarProduct(v)),
|
|
26
|
-
// }
|
|
27
|
-
// }
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { Vector } from "../../../geometry/vector";
|
|
3
|
+
// import { distinctRandTupleInt } from "../../../mathutils/random/randTupleInt";
|
|
4
|
+
// import { NumberNode } from "../../../tree/nodes/numbers/numberNode";
|
|
5
|
+
// import { latexParser } from "../../../tree/parsers/latexParser";
|
|
6
|
+
// import { Exercise, Question } from "../../exercise";
|
|
7
|
+
// import { getDistinctQuestions } from "../../utils/getDistinctQuestions";
|
|
8
|
+
// export const scalarProductViaNorms : Exercise = {
|
|
9
|
+
// id: 'scalarProductViaNorms',
|
|
10
|
+
// connector: "=",
|
|
11
|
+
// instruction: "",
|
|
12
|
+
// isSingleStep: false,
|
|
13
|
+
// label: "Calculer un produit scalaire à l'aide des normes.",
|
|
14
|
+
// levels: ["1, 0"],
|
|
15
|
+
// section: "vectors",
|
|
16
|
+
// generator: (nb: number) => getDistinctQuestions(getScalarProductViaNormsQuestion, nb)
|
|
17
|
+
// }
|
|
18
|
+
// export function getScalarProductViaNormsQuestion(): Question {
|
|
19
|
+
// const [coords1, coords2] = distinctRandTupleInt(2, 2, {from: -9, to: 10})
|
|
20
|
+
// const u = new Vector("u", new NumberNode(coords1[0]), new NumberNode(coords1[1]))
|
|
21
|
+
// const v = new Vector("v", new NumberNode(coords2[0]), new NumberNode(coords2[1]))
|
|
22
|
+
// return {
|
|
23
|
+
// instruction: `Soit ${u.toTexWithCoords()} et ${v.toTexWithCoords()}. Calculer ${u.toTex()}\\cdot ${v.toTex()}.`,
|
|
24
|
+
// startStatement: `${u.toTex()}\\cdot ${v.toTex()}`,
|
|
25
|
+
// answer: latexParser(u.scalarProduct(v)),
|
|
26
|
+
// }
|
|
27
|
+
// }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Exercise, Question } from '../exercise';
|
|
2
|
-
export declare const applyPercent: Exercise;
|
|
3
|
-
export declare function getApplyPercentQuestion(): Question;
|
|
1
|
+
import { Exercise, Question } from '../exercise';
|
|
2
|
+
export declare const applyPercent: Exercise;
|
|
3
|
+
export declare function getApplyPercentQuestion(): Question;
|
|
4
4
|
//# sourceMappingURL=applyPercent.d.ts.map
|