math-exercises 1.3.16 → 1.3.17
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 +39 -39
- package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts +7 -0
- package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts.map +1 -0
- package/lib/exercises/calcul/addAndSubWithoutRelatives.js +49 -0
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +35 -35
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +32 -32
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +32 -32
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts +1 -0
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -0
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.js +53 -0
- package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionsDivision.js +29 -29
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionsProduct.js +28 -28
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts +3 -3
- package/lib/exercises/calcul/fractions/fractionsSum.js +28 -28
- package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +3 -3
- package/lib/exercises/calcul/fractions/simplifyFraction.js +24 -24
- package/lib/exercises/calcul/operations/operationsPriorities.d.ts +10 -10
- package/lib/exercises/calcul/operations/operationsPriorities.js +98 -98
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +10 -0
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +179 -111
- package/lib/exercises/calcul/rounding/rounding.d.ts +19 -19
- package/lib/exercises/calcul/rounding/rounding.js +85 -85
- 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 +30 -30
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +31 -31
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +32 -32
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +32 -32
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +3 -3
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +31 -31
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts +4 -0
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +46 -0
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +37 -37
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +40 -40
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +41 -41
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +43 -43
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts +4 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +38 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.d.ts +4 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.js +41 -0
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts +3 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +32 -32
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts +3 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +33 -33
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts +3 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +32 -32
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +6 -6
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +38 -38
- package/lib/exercises/derivation/derivative/affineDerivative.d.ts +3 -3
- package/lib/exercises/derivation/derivative/affineDerivative.js +27 -27
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.js +28 -28
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts +4 -0
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.js +31 -0
- package/lib/exercises/derivation/derivative/usualderivative.d.ts +4 -0
- package/lib/exercises/derivation/derivative/usualderivative.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/usualderivative.js +67 -0
- package/lib/exercises/exercise.d.ts +16 -16
- package/lib/exercises/exercise.d.ts.map +1 -1
- 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 +152 -113
- package/lib/exercises/geometry/cartesian/midpoint.d.ts +3 -3
- package/lib/exercises/geometry/cartesian/midpoint.js +29 -29
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +3 -3
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +28 -28
- package/lib/exercises/geometry/vectors/scalarProductViaNorms.js +27 -27
- package/lib/exercises/percent/applyPercent.d.ts +4 -0
- package/lib/exercises/percent/applyPercent.d.ts.map +1 -0
- package/lib/exercises/percent/applyPercent.js +41 -0
- package/lib/exercises/percent/averageEvolutionRate.d.ts +4 -0
- package/lib/exercises/percent/averageEvolutionRate.d.ts.map +1 -0
- package/lib/exercises/percent/averageEvolutionRate.js +28 -0
- package/lib/exercises/percent/globalPercent.d.ts +4 -0
- package/lib/exercises/percent/globalPercent.d.ts.map +1 -0
- package/lib/exercises/percent/globalPercent.js +44 -0
- package/lib/exercises/percent/reciprocalPercentage.d.ts +4 -0
- package/lib/exercises/percent/reciprocalPercentage.d.ts.map +1 -0
- package/lib/exercises/percent/reciprocalPercentage.js +35 -0
- package/lib/exercises/powers/powersDivision.d.ts +7 -7
- package/lib/exercises/powers/powersDivision.js +44 -44
- package/lib/exercises/powers/powersOfTenToDecimal.d.ts +6 -6
- package/lib/exercises/powers/powersOfTenToDecimal.js +32 -32
- package/lib/exercises/powers/powersPower.d.ts +7 -7
- package/lib/exercises/powers/powersPower.js +43 -43
- package/lib/exercises/powers/powersProduct.d.ts +7 -7
- package/lib/exercises/powers/powersProduct.js +44 -44
- package/lib/exercises/powers/scientificToDecimal.d.ts +6 -6
- package/lib/exercises/powers/scientificToDecimal.js +37 -37
- package/lib/exercises/proba/conditionalProbability.d.ts +4 -0
- package/lib/exercises/proba/conditionalProbability.d.ts.map +1 -0
- package/lib/exercises/proba/conditionalProbability.js +72 -0
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +29 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.js +29 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.js +29 -0
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +28 -0
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +28 -0
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts +4 -0
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -0
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.js +39 -0
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +34 -34
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +33 -33
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricFindReason.js +29 -29
- package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts +3 -3
- package/lib/exercises/sequences/geometric/geometricReasonUsage.js +28 -28
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts +7 -7
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -28
- package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +3 -3
- package/lib/exercises/squareRoots/simpifySquareRoot.js +27 -27
- package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +3 -3
- package/lib/exercises/trigonometry/mainRemarkableValues.js +28 -28
- package/lib/exercises/trigonometry/remarkableValues.d.ts +3 -3
- package/lib/exercises/trigonometry/remarkableValues.js +28 -28
- package/lib/exercises/utils/getDistinctQuestions.d.ts +2 -2
- package/lib/exercises/utils/getDistinctQuestions.js +15 -15
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -6
- package/lib/math/geometry/point.d.ts +12 -12
- package/lib/math/geometry/point.js +27 -27
- 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.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.js +131 -129
- 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/server.d.ts +1 -1
- package/lib/server.js +33 -34
- 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/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/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 +49 -50
- package/lib/exercises/calcul/operationsPriorities.js +0 -88
- package/lib/exercises/derivation/derivative/thridDegreeDerivative.d.ts +0 -1
- package/lib/exercises/derivation/derivative/thridDegreeDerivative.d.ts.map +0 -1
- package/lib/exercises/derivation/derivative/thridDegreeDerivative.js +0 -1
- package/lib/geometry/point.js +0 -27
- package/lib/geometry/vector.js +0 -31
- package/lib/mathutils/arithmetic/coprimesOf.js +0 -13
- package/lib/mathutils/arithmetic/dividersOf.js +0 -12
- package/lib/mathutils/arithmetic/gcd.js +0 -7
- package/lib/mathutils/arithmetic/isSquare.js +0 -7
- package/lib/mathutils/arithmetic/lcd.js +0 -12
- package/lib/mathutils/arithmetic/nonCoprimesOf.js +0 -13
- package/lib/mathutils/arithmetic/nonDividersOf.js +0 -14
- package/lib/mathutils/arithmetic/primeFactors.js +0 -22
- package/lib/mathutils/decimals/decimalPartLengthOf.js +0 -14
- package/lib/mathutils/random/randTupleInt.js +0 -30
- package/lib/mathutils/random/randint.js +0 -18
- package/lib/mathutils/round.js +0 -8
- package/lib/numbers/decimals/decimal.js +0 -140
- package/lib/numbers/epsilon.js +0 -10
- package/lib/numbers/integer/integer.js +0 -68
- package/lib/numbers/integer/power.js +0 -52
- package/lib/numbers/nombre.js +0 -10
- package/lib/numbers/rationals/rational.js +0 -113
- package/lib/numbers/reals/real.js +0 -16
- package/lib/numbers/reals/squareRoot.js +0 -63
- package/lib/polynomials/affine.js +0 -42
- package/lib/polynomials/polynomial.js +0 -125
- package/lib/sets/discreteSet.js +0 -28
- package/lib/sets/emptySet.js +0 -6
- package/lib/sets/intervals/intervals.js +0 -108
- package/lib/sets/intervals/union.js +0 -1
- package/lib/sets/mathSet.js +0 -10
- package/lib/sets/mathSetInterface.js +0 -2
- package/lib/tree/parsers/latexParser.js +0 -110
- package/lib/utils/coin.js +0 -7
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* (a^b)^c
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getPowersPowerQuestion = exports.powersPower = exports.powersOfTenPower = void 0;
|
|
7
|
-
const power_1 = require("../../math/numbers/integer/power");
|
|
8
|
-
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
-
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
-
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
11
|
-
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
12
|
-
exports.powersOfTenPower = {
|
|
13
|
-
id: 'powersOfTenPower',
|
|
14
|
-
connector: '=',
|
|
15
|
-
instruction: 'Calculer :',
|
|
16
|
-
label: "Puissance d'une puissance de 10 ",
|
|
17
|
-
levels: ['4', '3', '2', '1'],
|
|
18
|
-
section: 'Puissances',
|
|
19
|
-
isSingleStep: true,
|
|
20
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getPowersPowerQuestion(true), nb),
|
|
21
|
-
};
|
|
22
|
-
exports.powersPower = {
|
|
23
|
-
id: 'powersPower',
|
|
24
|
-
connector: '=',
|
|
25
|
-
instruction: 'Calculer :',
|
|
26
|
-
label: "Puissance d'une puissance",
|
|
27
|
-
levels: ['4', '3', '2', '1'],
|
|
28
|
-
section: 'Puissances',
|
|
29
|
-
isSingleStep: true,
|
|
30
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPowersPowerQuestion, nb),
|
|
31
|
-
};
|
|
32
|
-
function getPowersPowerQuestion(useOnlyPowersOfTen = false) {
|
|
33
|
-
const a = useOnlyPowersOfTen ? 10 : (0, randint_1.randint)(-11, 11);
|
|
34
|
-
const [b, c] = [1, 2].map((el) => (0, randint_1.randint)(-11, 11));
|
|
35
|
-
const statement = new powerNode_1.PowerNode(new powerNode_1.PowerNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b)), new numberNode_1.NumberNode(c));
|
|
36
|
-
let answerTree = new power_1.Power(a, b * c).simplify();
|
|
37
|
-
const question = {
|
|
38
|
-
startStatement: statement.toTex(),
|
|
39
|
-
answer: answerTree.toTex(),
|
|
40
|
-
};
|
|
41
|
-
return question;
|
|
42
|
-
}
|
|
43
|
-
exports.getPowersPowerQuestion = getPowersPowerQuestion;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* (a^b)^c
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getPowersPowerQuestion = exports.powersPower = exports.powersOfTenPower = void 0;
|
|
7
|
+
const power_1 = require("../../math/numbers/integer/power");
|
|
8
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
11
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
12
|
+
exports.powersOfTenPower = {
|
|
13
|
+
id: 'powersOfTenPower',
|
|
14
|
+
connector: '=',
|
|
15
|
+
instruction: 'Calculer :',
|
|
16
|
+
label: "Puissance d'une puissance de 10 ",
|
|
17
|
+
levels: ['4', '3', '2', '1'],
|
|
18
|
+
section: 'Puissances',
|
|
19
|
+
isSingleStep: true,
|
|
20
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getPowersPowerQuestion(true), nb),
|
|
21
|
+
};
|
|
22
|
+
exports.powersPower = {
|
|
23
|
+
id: 'powersPower',
|
|
24
|
+
connector: '=',
|
|
25
|
+
instruction: 'Calculer :',
|
|
26
|
+
label: "Puissance d'une puissance",
|
|
27
|
+
levels: ['4', '3', '2', '1'],
|
|
28
|
+
section: 'Puissances',
|
|
29
|
+
isSingleStep: true,
|
|
30
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPowersPowerQuestion, nb),
|
|
31
|
+
};
|
|
32
|
+
function getPowersPowerQuestion(useOnlyPowersOfTen = false) {
|
|
33
|
+
const a = useOnlyPowersOfTen ? 10 : (0, randint_1.randint)(-11, 11);
|
|
34
|
+
const [b, c] = [1, 2].map((el) => (0, randint_1.randint)(-11, 11));
|
|
35
|
+
const statement = new powerNode_1.PowerNode(new powerNode_1.PowerNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b)), new numberNode_1.NumberNode(c));
|
|
36
|
+
let answerTree = new power_1.Power(a, b * c).simplify();
|
|
37
|
+
const question = {
|
|
38
|
+
startStatement: statement.toTex(),
|
|
39
|
+
answer: answerTree.toTex(),
|
|
40
|
+
};
|
|
41
|
+
return question;
|
|
42
|
+
}
|
|
43
|
+
exports.getPowersPowerQuestion = getPowersPowerQuestion;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* a^b*a^c
|
|
3
|
-
*/
|
|
4
|
-
import { Exercise, Question } from '../exercise';
|
|
5
|
-
export declare const powersOfTenProduct: Exercise;
|
|
6
|
-
export declare const powersProduct: Exercise;
|
|
7
|
-
export declare function getPowersProductQuestion(useOnlyPowersOfTen?: boolean): Question;
|
|
1
|
+
/**
|
|
2
|
+
* a^b*a^c
|
|
3
|
+
*/
|
|
4
|
+
import { Exercise, Question } from '../exercise';
|
|
5
|
+
export declare const powersOfTenProduct: Exercise;
|
|
6
|
+
export declare const powersProduct: Exercise;
|
|
7
|
+
export declare function getPowersProductQuestion(useOnlyPowersOfTen?: boolean): Question;
|
|
8
8
|
//# sourceMappingURL=powersProduct.d.ts.map
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* a^b*a^c
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getPowersProductQuestion = exports.powersProduct = exports.powersOfTenProduct = void 0;
|
|
7
|
-
const power_1 = require("../../math/numbers/integer/power");
|
|
8
|
-
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
-
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
-
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
11
|
-
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
12
|
-
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
13
|
-
exports.powersOfTenProduct = {
|
|
14
|
-
id: 'powersOfTenProduct',
|
|
15
|
-
connector: '=',
|
|
16
|
-
instruction: 'Calculer :',
|
|
17
|
-
label: 'Multiplication de puissances de 10',
|
|
18
|
-
levels: ['4', '3', '2', '1'],
|
|
19
|
-
section: 'Puissances',
|
|
20
|
-
isSingleStep: true,
|
|
21
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getPowersProductQuestion(true), nb),
|
|
22
|
-
};
|
|
23
|
-
exports.powersProduct = {
|
|
24
|
-
id: 'powersProduct',
|
|
25
|
-
connector: '=',
|
|
26
|
-
instruction: 'Calculer :',
|
|
27
|
-
label: 'Multiplication de puissances',
|
|
28
|
-
levels: ['4', '3', '2', '1'],
|
|
29
|
-
section: 'Puissances',
|
|
30
|
-
isSingleStep: true,
|
|
31
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPowersProductQuestion, nb),
|
|
32
|
-
};
|
|
33
|
-
function getPowersProductQuestion(useOnlyPowersOfTen = false) {
|
|
34
|
-
const a = useOnlyPowersOfTen ? 10 : (0, randint_1.randint)(-11, 11);
|
|
35
|
-
const [b, c] = [1, 2].map((el) => (0, randint_1.randint)(-11, 11));
|
|
36
|
-
const statement = new multiplyNode_1.MultiplyNode(new powerNode_1.PowerNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b)), new powerNode_1.PowerNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(c)));
|
|
37
|
-
const answerTree = new power_1.Power(a, b + c).simplify();
|
|
38
|
-
const question = {
|
|
39
|
-
startStatement: statement.toTex(),
|
|
40
|
-
answer: answerTree.toTex(),
|
|
41
|
-
};
|
|
42
|
-
return question;
|
|
43
|
-
}
|
|
44
|
-
exports.getPowersProductQuestion = getPowersProductQuestion;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* a^b*a^c
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getPowersProductQuestion = exports.powersProduct = exports.powersOfTenProduct = void 0;
|
|
7
|
+
const power_1 = require("../../math/numbers/integer/power");
|
|
8
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
+
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
11
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
12
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
13
|
+
exports.powersOfTenProduct = {
|
|
14
|
+
id: 'powersOfTenProduct',
|
|
15
|
+
connector: '=',
|
|
16
|
+
instruction: 'Calculer :',
|
|
17
|
+
label: 'Multiplication de puissances de 10',
|
|
18
|
+
levels: ['4', '3', '2', '1'],
|
|
19
|
+
section: 'Puissances',
|
|
20
|
+
isSingleStep: true,
|
|
21
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getPowersProductQuestion(true), nb),
|
|
22
|
+
};
|
|
23
|
+
exports.powersProduct = {
|
|
24
|
+
id: 'powersProduct',
|
|
25
|
+
connector: '=',
|
|
26
|
+
instruction: 'Calculer :',
|
|
27
|
+
label: 'Multiplication de puissances',
|
|
28
|
+
levels: ['4', '3', '2', '1'],
|
|
29
|
+
section: 'Puissances',
|
|
30
|
+
isSingleStep: true,
|
|
31
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPowersProductQuestion, nb),
|
|
32
|
+
};
|
|
33
|
+
function getPowersProductQuestion(useOnlyPowersOfTen = false) {
|
|
34
|
+
const a = useOnlyPowersOfTen ? 10 : (0, randint_1.randint)(-11, 11);
|
|
35
|
+
const [b, c] = [1, 2].map((el) => (0, randint_1.randint)(-11, 11));
|
|
36
|
+
const statement = new multiplyNode_1.MultiplyNode(new powerNode_1.PowerNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b)), new powerNode_1.PowerNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(c)));
|
|
37
|
+
const answerTree = new power_1.Power(a, b + c).simplify();
|
|
38
|
+
const question = {
|
|
39
|
+
startStatement: statement.toTex(),
|
|
40
|
+
answer: answerTree.toTex(),
|
|
41
|
+
};
|
|
42
|
+
return question;
|
|
43
|
+
}
|
|
44
|
+
exports.getPowersProductQuestion = getPowersProductQuestion;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* a*10^x vers décimal
|
|
3
|
-
* */
|
|
4
|
-
import { Exercise, Question } from '../exercise';
|
|
5
|
-
export declare const scientificToDecimal: Exercise;
|
|
6
|
-
export declare function getScientificToDecimalQuestion(): Question;
|
|
1
|
+
/**
|
|
2
|
+
* a*10^x vers décimal
|
|
3
|
+
* */
|
|
4
|
+
import { Exercise, Question } from '../exercise';
|
|
5
|
+
export declare const scientificToDecimal: Exercise;
|
|
6
|
+
export declare function getScientificToDecimalQuestion(): Question;
|
|
7
7
|
//# sourceMappingURL=scientificToDecimal.d.ts.map
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* a*10^x vers décimal
|
|
4
|
-
* */
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getScientificToDecimalQuestion = exports.scientificToDecimal = void 0;
|
|
7
|
-
const decimal_1 = require("../../math/numbers/decimals/decimal");
|
|
8
|
-
const integer_1 = require("../../math/numbers/integer/integer");
|
|
9
|
-
const randint_1 = require("../../math/utils/random/randint");
|
|
10
|
-
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
11
|
-
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
12
|
-
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
13
|
-
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
14
|
-
exports.scientificToDecimal = {
|
|
15
|
-
id: 'scientificToDecimal',
|
|
16
|
-
connector: '=',
|
|
17
|
-
instruction: "Donner l'écriture décimale de :",
|
|
18
|
-
label: 'Ecriture décimale de $a\\times 10^x$',
|
|
19
|
-
levels: ['5', '4', '3', '2'],
|
|
20
|
-
section: 'Puissances',
|
|
21
|
-
isSingleStep: true,
|
|
22
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScientificToDecimalQuestion, nb),
|
|
23
|
-
};
|
|
24
|
-
function getScientificToDecimalQuestion() {
|
|
25
|
-
const randPower = (0, randint_1.randint)(-6, 8);
|
|
26
|
-
const int = integer_1.IntegerConstructor.random((0, randint_1.randint)(1, 4));
|
|
27
|
-
const fracPart = decimal_1.DecimalConstructor.randomFracPart((0, randint_1.randint)(0, 4));
|
|
28
|
-
const randDecimal = decimal_1.DecimalConstructor.fromParts(int + '', fracPart);
|
|
29
|
-
const statement = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(randDecimal.value), new powerNode_1.PowerNode(new numberNode_1.NumberNode(10), new numberNode_1.NumberNode(randPower)));
|
|
30
|
-
const answerTree = randDecimal.multiplyByPowerOfTen(randPower).toTree();
|
|
31
|
-
const question = {
|
|
32
|
-
startStatement: statement.toTex(),
|
|
33
|
-
answer: answerTree.toTex(),
|
|
34
|
-
};
|
|
35
|
-
return question;
|
|
36
|
-
}
|
|
37
|
-
exports.getScientificToDecimalQuestion = getScientificToDecimalQuestion;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* a*10^x vers décimal
|
|
4
|
+
* */
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getScientificToDecimalQuestion = exports.scientificToDecimal = void 0;
|
|
7
|
+
const decimal_1 = require("../../math/numbers/decimals/decimal");
|
|
8
|
+
const integer_1 = require("../../math/numbers/integer/integer");
|
|
9
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
10
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
11
|
+
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
12
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
13
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
14
|
+
exports.scientificToDecimal = {
|
|
15
|
+
id: 'scientificToDecimal',
|
|
16
|
+
connector: '=',
|
|
17
|
+
instruction: "Donner l'écriture décimale de :",
|
|
18
|
+
label: 'Ecriture décimale de $a\\times 10^x$',
|
|
19
|
+
levels: ['5', '4', '3', '2'],
|
|
20
|
+
section: 'Puissances',
|
|
21
|
+
isSingleStep: true,
|
|
22
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScientificToDecimalQuestion, nb),
|
|
23
|
+
};
|
|
24
|
+
function getScientificToDecimalQuestion() {
|
|
25
|
+
const randPower = (0, randint_1.randint)(-6, 8);
|
|
26
|
+
const int = integer_1.IntegerConstructor.random((0, randint_1.randint)(1, 4));
|
|
27
|
+
const fracPart = decimal_1.DecimalConstructor.randomFracPart((0, randint_1.randint)(0, 4));
|
|
28
|
+
const randDecimal = decimal_1.DecimalConstructor.fromParts(int + '', fracPart);
|
|
29
|
+
const statement = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(randDecimal.value), new powerNode_1.PowerNode(new numberNode_1.NumberNode(10), new numberNode_1.NumberNode(randPower)));
|
|
30
|
+
const answerTree = randDecimal.multiplyByPowerOfTen(randPower).toTree();
|
|
31
|
+
const question = {
|
|
32
|
+
startStatement: statement.toTex(),
|
|
33
|
+
answer: answerTree.toTex(),
|
|
34
|
+
};
|
|
35
|
+
return question;
|
|
36
|
+
}
|
|
37
|
+
exports.getScientificToDecimalQuestion = getScientificToDecimalQuestion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditionalProbability.d.ts","sourceRoot":"","sources":["../../../src/exercises/proba/conditionalProbability.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,sBAAsB,EAAE,QASpC,CAAC;AAEF,wBAAgB,yBAAyB,IAAI,QAAQ,CA2DpD"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getConditionalProbability = exports.conditionalProbability = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
6
|
+
const round_1 = require("../../math/utils/round");
|
|
7
|
+
exports.conditionalProbability = {
|
|
8
|
+
id: 'conditionalProbability',
|
|
9
|
+
connector: '=',
|
|
10
|
+
instruction: '',
|
|
11
|
+
label: 'Calcul de probabilité conditionnelle avec la formule',
|
|
12
|
+
levels: ['1', '0'],
|
|
13
|
+
isSingleStep: false,
|
|
14
|
+
section: 'Probabilités',
|
|
15
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConditionalProbability, nb),
|
|
16
|
+
};
|
|
17
|
+
function getConditionalProbability() {
|
|
18
|
+
const pA = (0, randint_1.randint)(2, 100);
|
|
19
|
+
const pB = (0, randint_1.randint)(2, 100);
|
|
20
|
+
const pAB = (0, randint_1.randint)(1, Math.min(pA, pB));
|
|
21
|
+
const pA_B = (0, round_1.round)(pAB / pB, 2);
|
|
22
|
+
const pB_A = (0, round_1.round)(pAB / pA, 2);
|
|
23
|
+
const flip = (0, randint_1.randint)(1, 7);
|
|
24
|
+
let instruction = `On considère deux événements A et B tels que `;
|
|
25
|
+
let startStatement = '';
|
|
26
|
+
let answer = '';
|
|
27
|
+
switch (flip) {
|
|
28
|
+
case 1: {
|
|
29
|
+
instruction += `$p(A) = ${pA / 100}, p(A \\cap B) = ${pAB / 100}$.$\\\\$Déterminer $p_A(B)$.`;
|
|
30
|
+
startStatement = `p_A(B)`;
|
|
31
|
+
answer = `${pB_A}`.replace('.', ',');
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
case 2: {
|
|
35
|
+
instruction += `$p(B) = ${pB / 100}, p(B \\cap A) = ${pAB / 100}$.$\\\\$Déterminer $p_B(A)$.`;
|
|
36
|
+
startStatement = `p_B(A)`;
|
|
37
|
+
answer = `${pA_B}`.replace('.', ',');
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
case 3: {
|
|
41
|
+
instruction += `$p(A) = ${pA / 100}, p_A(B) = ${pB_A}$.$\\\\$Déterminer $p(A \\cap B)$.`;
|
|
42
|
+
startStatement = `p(A \\cap B)`;
|
|
43
|
+
answer = `${pAB / 100}`.replace('.', ',');
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
case 4: {
|
|
47
|
+
instruction += `$p(B) = ${pB / 100}, p_B(A) = ${pA_B}$.$\\\\$Déterminer $p(A \\cap B)$.`;
|
|
48
|
+
startStatement = `p(A \\cap B)`;
|
|
49
|
+
answer = `${pAB / 100}`.replace('.', ',');
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
case 5: {
|
|
53
|
+
instruction += `$p(A \\cap B) = ${pAB / 100}, p_B(A) = ${pA_B}$.$\\\\$Déterminer $p(B)$.`;
|
|
54
|
+
startStatement = `p(B)`;
|
|
55
|
+
answer = `${pB / 100}`.replace('.', ',');
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
case 6: {
|
|
59
|
+
instruction += `$p(A \\cap B) = ${pAB / 100}, p_A(B) = ${pB_A}$.$\\\\$Déterminer $p(A)$.`;
|
|
60
|
+
startStatement = `p(A)`;
|
|
61
|
+
answer = `${pA / 100}`.replace('.', ',');
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const question = {
|
|
66
|
+
instruction,
|
|
67
|
+
startStatement,
|
|
68
|
+
answer,
|
|
69
|
+
};
|
|
70
|
+
return question;
|
|
71
|
+
}
|
|
72
|
+
exports.getConditionalProbability = getConditionalProbability;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arithmeticExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY9D,eAAO,MAAM,8BAA8B,EAAE,QAS5C,CAAC;AAEF,wBAAgB,iCAAiC,IAAI,QAAQ,CAc5D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getArithmeticExplicitFormulaUsage = exports.arithmeticExplicitFormulaUsage = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
exports.arithmeticExplicitFormulaUsage = {
|
|
8
|
+
id: 'arithmeticExplicitFormulaUsage',
|
|
9
|
+
connector: '=',
|
|
10
|
+
instruction: '',
|
|
11
|
+
label: "Utiliser la formule générale d'une suite arithmétique",
|
|
12
|
+
levels: ['1', '0'],
|
|
13
|
+
isSingleStep: false,
|
|
14
|
+
section: 'Suites',
|
|
15
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getArithmeticExplicitFormulaUsage, nb),
|
|
16
|
+
};
|
|
17
|
+
function getArithmeticExplicitFormulaUsage() {
|
|
18
|
+
const askedRank = (0, randint_1.randint)(0, 10);
|
|
19
|
+
const firstValue = (0, randint_1.randint)(-10, 10);
|
|
20
|
+
const reason = (0, randint_1.randint)(-10, 10, [0]);
|
|
21
|
+
const polynomial = new polynomial_1.Polynomial([firstValue, reason], 'n');
|
|
22
|
+
const question = {
|
|
23
|
+
instruction: `$(u_n)$ est une suite arithmétique définie par $u_n = ${polynomial.toString()}$. Calculer :`,
|
|
24
|
+
startStatement: `u_{${askedRank}}`,
|
|
25
|
+
answer: (firstValue + askedRank * reason).toString(),
|
|
26
|
+
};
|
|
27
|
+
return question;
|
|
28
|
+
}
|
|
29
|
+
exports.getArithmeticExplicitFormulaUsage = getArithmeticExplicitFormulaUsage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arithmeticFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY9D,eAAO,MAAM,6BAA6B,EAAE,QAS3C,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAc3D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getArithmeticFindExplicitFormula = exports.arithmeticFindExplicitFormula = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
exports.arithmeticFindExplicitFormula = {
|
|
8
|
+
id: 'arithmeticFindExplicitFormula',
|
|
9
|
+
connector: '=',
|
|
10
|
+
instruction: '',
|
|
11
|
+
label: "Déterminer la formule générale d'une suite arithmétique",
|
|
12
|
+
levels: ['1', '0'],
|
|
13
|
+
isSingleStep: false,
|
|
14
|
+
section: 'Suites',
|
|
15
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getArithmeticFindExplicitFormula, nb),
|
|
16
|
+
};
|
|
17
|
+
function getArithmeticFindExplicitFormula() {
|
|
18
|
+
const firstRank = 0;
|
|
19
|
+
const firstValue = (0, randint_1.randint)(-10, 10);
|
|
20
|
+
const reason = (0, randint_1.randint)(-10, 10, [0]);
|
|
21
|
+
const formula = new polynomial_1.Polynomial([firstValue, reason], 'n');
|
|
22
|
+
const question = {
|
|
23
|
+
instruction: `$(u_n)$ est une suite arithmétique de premier terme $u_{${firstRank}} = ${firstValue}$ et de raison $r = ${reason}$. $\\\\$ Donner l'expression de $u_n$ en fonction de $n$.`,
|
|
24
|
+
startStatement: 'u_n',
|
|
25
|
+
answer: formula.toString(),
|
|
26
|
+
};
|
|
27
|
+
return question;
|
|
28
|
+
}
|
|
29
|
+
exports.getArithmeticFindExplicitFormula = getArithmeticFindExplicitFormula;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arithmeticFindReason.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticFindReason.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,uBAAuB,IAAI,QAAQ,CAalD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getArithmeticFindReason = exports.arithmeticFindReason = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
exports.arithmeticFindReason = {
|
|
7
|
+
id: 'arithmeticFindReason',
|
|
8
|
+
connector: '=',
|
|
9
|
+
instruction: '',
|
|
10
|
+
label: "Déterminer la raison d'une suite arithmétique",
|
|
11
|
+
levels: ['1', '0'],
|
|
12
|
+
isSingleStep: false,
|
|
13
|
+
section: 'Suites',
|
|
14
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getArithmeticFindReason, nb),
|
|
15
|
+
};
|
|
16
|
+
function getArithmeticFindReason() {
|
|
17
|
+
const rank1 = (0, randint_1.randint)(0, 10);
|
|
18
|
+
const rank2 = rank1 + 1;
|
|
19
|
+
const reason = (0, randint_1.randint)(-10, 10, [0]);
|
|
20
|
+
const value1 = (0, randint_1.randint)(-10, 10);
|
|
21
|
+
const value2 = reason + value1;
|
|
22
|
+
const question = {
|
|
23
|
+
instruction: `$(u_n)$ est une suite arithmétique. On sait que $u_{${rank1}} = ${value1}$ et $u_{${rank2}} = ${value2}$. Quelle est la raison de la suite $(u_n)$ ?`,
|
|
24
|
+
startStatement: 'r',
|
|
25
|
+
answer: reason.toString(),
|
|
26
|
+
};
|
|
27
|
+
return question;
|
|
28
|
+
}
|
|
29
|
+
exports.getArithmeticFindReason = getArithmeticFindReason;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arithmeticReasonUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticReasonUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI9D,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAWnD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getArithmeticReasonUsage = exports.arithmeticReasonUsage = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
exports.arithmeticReasonUsage = {
|
|
7
|
+
id: 'arithmeticReasonUsage',
|
|
8
|
+
connector: '=',
|
|
9
|
+
instruction: '',
|
|
10
|
+
label: "Utiliser la raison d'une suite arithmétique",
|
|
11
|
+
levels: ['1', '0'],
|
|
12
|
+
isSingleStep: false,
|
|
13
|
+
section: 'Suites',
|
|
14
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getArithmeticReasonUsage, nb),
|
|
15
|
+
};
|
|
16
|
+
function getArithmeticReasonUsage() {
|
|
17
|
+
const reason = (0, randint_1.randint)(-10, 10, [0]);
|
|
18
|
+
const startRank = (0, randint_1.randint)(0, 20);
|
|
19
|
+
const askedRank = startRank + 1;
|
|
20
|
+
const startValue = (0, randint_1.randint)(-10, 10);
|
|
21
|
+
const question = {
|
|
22
|
+
instruction: `$(u_n)$ est une suite arithmétique de raison $r = ${reason}$ et on sait que $u_{${startRank}} = ${startValue}$. Calculer : `,
|
|
23
|
+
startStatement: `u_{${askedRank}}`,
|
|
24
|
+
answer: (startValue + reason).toString(),
|
|
25
|
+
};
|
|
26
|
+
return question;
|
|
27
|
+
}
|
|
28
|
+
exports.getArithmeticReasonUsage = getArithmeticReasonUsage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arithmeticRecurrenceFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAoB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIhF,eAAO,MAAM,gCAAgC,EAAE,QAS9C,CAAC;AAEF,wBAAgB,mCAAmC,IAAI,QAAQ,CAY9D"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getArithmeticRecurrenceFormulaUsage = exports.arithmeticRecurrenceFormulaUsage = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
exports.arithmeticRecurrenceFormulaUsage = {
|
|
7
|
+
id: 'arithmeticRecurrenceFormulaUsage',
|
|
8
|
+
connector: '=',
|
|
9
|
+
instruction: '',
|
|
10
|
+
label: "Utiliser la formule de récurrence d'une suite arithmétique",
|
|
11
|
+
levels: ['1', '0'],
|
|
12
|
+
isSingleStep: false,
|
|
13
|
+
section: 'Suites',
|
|
14
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getArithmeticRecurrenceFormulaUsage, nb),
|
|
15
|
+
};
|
|
16
|
+
function getArithmeticRecurrenceFormulaUsage() {
|
|
17
|
+
const firstRank = (0, randint_1.randint)(1, 20);
|
|
18
|
+
const firstValue = (0, randint_1.randint)(-10, 10);
|
|
19
|
+
const reason = (0, randint_1.randint)(-10, 10, [0]);
|
|
20
|
+
const askedRank = firstRank + 1;
|
|
21
|
+
const question = {
|
|
22
|
+
instruction: `$(u_n)$ est une suite définie par $u_{n+1} = ${reason} + u_n$ et $u_{${firstRank}} = ${firstValue}$. Calculer :`,
|
|
23
|
+
startStatement: `u_{${askedRank}}`,
|
|
24
|
+
answer: (firstValue + reason).toString(),
|
|
25
|
+
};
|
|
26
|
+
return question;
|
|
27
|
+
}
|
|
28
|
+
exports.getArithmeticRecurrenceFormulaUsage = getArithmeticRecurrenceFormulaUsage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arithmeticThresholdFind.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticThresholdFind.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGpD,eAAO,MAAM,uBAAuB,EAAE,QASrC,CAAC;AAEF,wBAAgB,0BAA0B,IAAI,QAAQ,CAyBrD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getArithmeticThresholdFind = exports.arithmeticThresholdFind = void 0;
|
|
4
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
7
|
+
exports.arithmeticThresholdFind = {
|
|
8
|
+
id: 'arithmeticThresholdFind',
|
|
9
|
+
connector: '=',
|
|
10
|
+
instruction: '',
|
|
11
|
+
label: "Calculer un seuil à l'aide d'une suite arithmétique",
|
|
12
|
+
levels: ['1', '0'],
|
|
13
|
+
isSingleStep: false,
|
|
14
|
+
section: 'Suites',
|
|
15
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getArithmeticThresholdFind, nb),
|
|
16
|
+
};
|
|
17
|
+
function getArithmeticThresholdFind() {
|
|
18
|
+
const firstValue = (0, randint_1.randint)(-10, 10);
|
|
19
|
+
const reason = (0, randint_1.randint)(-10, 10, [0]);
|
|
20
|
+
let randValue = firstValue;
|
|
21
|
+
const formula = new polynomial_1.Polynomial([firstValue, reason], 'n');
|
|
22
|
+
let instruction = `$(u_n)$ est une suite arithmétique définie par $u_n = ${formula.toString()}$. `;
|
|
23
|
+
let answer = '';
|
|
24
|
+
if (reason > 0) {
|
|
25
|
+
randValue += (0, randint_1.randint)(reason, 100);
|
|
26
|
+
instruction += `A partir de quel rang a-t-on $u_n > ${randValue}$ ?`;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
randValue += (0, randint_1.randint)(-100, reason);
|
|
30
|
+
instruction += `A partir de quel rang a-t-on $u_n < ${randValue}$ ?`;
|
|
31
|
+
}
|
|
32
|
+
const question = {
|
|
33
|
+
instruction,
|
|
34
|
+
startStatement: `n`,
|
|
35
|
+
answer: (Math.floor((randValue - firstValue) / reason) + 1).toString(),
|
|
36
|
+
};
|
|
37
|
+
return question;
|
|
38
|
+
}
|
|
39
|
+
exports.getArithmeticThresholdFind = getArithmeticThresholdFind;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Exercise, Question } from '../../../exercises/exercise';
|
|
2
|
-
export declare const geometricExplicitFormulaUsage: Exercise;
|
|
3
|
-
export declare function getGeometricExplicitFormulaUsage(): Question;
|
|
1
|
+
import { Exercise, Question } from '../../../exercises/exercise';
|
|
2
|
+
export declare const geometricExplicitFormulaUsage: Exercise;
|
|
3
|
+
export declare function getGeometricExplicitFormulaUsage(): Question;
|
|
4
4
|
//# sourceMappingURL=geometricExplicitFormulaUsage.d.ts.map
|