math-exercises 2.2.6 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/calcul/addAndSub.js +1 -1
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.js +10 -7
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +0 -1
- package/lib/exercises/math/calcul/digitDecimalRank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRank.js +2 -3
- package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRankNumber.js +2 -3
- package/lib/exercises/math/calcul/digitRank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitRank.js +2 -3
- package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitRankNumber.js +2 -3
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +0 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +0 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +0 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts +10 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +61 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts +10 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +56 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts +9 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +57 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts +3 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/index.js +3 -0
- package/lib/exercises/math/calcul/fractions/simplifyFraction.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFraction.js +0 -1
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +2 -0
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/index.js +2 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts +7 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.js +71 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +25 -17
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts +7 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +93 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts +1 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -0
- package/lib/exercises/math/calcul/operations/expressionNature.js +81 -0
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +0 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +0 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +0 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +0 -1
- package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +0 -1
- package/lib/exercises/math/complex/addComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/addComplex.js +0 -1
- package/lib/exercises/math/complex/conjugateComplex.ts.d.ts.map +1 -1
- package/lib/exercises/math/complex/conjugateComplex.ts.js +0 -1
- package/lib/exercises/math/complex/conjugateDivideComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/conjugateDivideComplex.js +0 -1
- package/lib/exercises/math/complex/inverseComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/inverseComplex.js +0 -1
- package/lib/exercises/math/complex/moduloFromAlgebraicComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/moduloFromAlgebraicComplex.js +0 -1
- package/lib/exercises/math/complex/mutiplyComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/mutiplyComplex.js +0 -1
- package/lib/exercises/math/conversion/aeraConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/aeraConversion.js +0 -2
- package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/capacityConversion.js +0 -1
- package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +0 -2
- package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/massConversion.js +0 -2
- package/lib/exercises/math/conversion/volumeCapacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeCapacityConversion.js +0 -2
- package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeConversion.js +0 -2
- package/lib/exercises/math/derivation/derivative/expDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeOne.js +0 -1
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeOne.js +0 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +0 -1
- package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.js +0 -2
- package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivativeNumberReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivativeNumberReading.js +0 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +0 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +0 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +0 -1
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +12 -3
- package/lib/exercises/math/functions/cube/cubicEquation.js +0 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +0 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +3 -4
- package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +0 -1
- package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +0 -1
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +1 -1
- package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.js +0 -2
- package/lib/exercises/math/geometry/areas/triangleAreaV2.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/triangleAreaV2.js +0 -1
- package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.js +0 -1
- package/lib/exercises/math/geometry/cartesian/midpoint.js +0 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts +4 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +0 -1
- package/lib/exercises/math/geometry/thales/thales.js +0 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +0 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +0 -2
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +0 -2
- package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
- package/lib/exercises/math/percent/averageEvolutionRate.js +16 -0
- package/lib/exercises/math/percent/cmToEvolution.d.ts +7 -0
- package/lib/exercises/math/percent/cmToEvolution.d.ts.map +1 -0
- package/lib/exercises/math/percent/cmToEvolution.js +70 -0
- package/lib/exercises/math/percent/evolutionToCM.d.ts +0 -1
- package/lib/exercises/math/percent/evolutionToCM.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutionToCM.js +20 -24
- package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
- package/lib/exercises/math/percent/findProportion.js +16 -1
- package/lib/exercises/math/percent/globalPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/globalPercent.js +14 -0
- package/lib/exercises/math/percent/index.d.ts +1 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -0
- package/lib/exercises/math/percent/isTableProportional.d.ts.map +1 -1
- package/lib/exercises/math/percent/isTableProportional.js +35 -33
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +14 -1
- package/lib/exercises/math/percent/reciprocalPercentage.d.ts.map +1 -1
- package/lib/exercises/math/percent/reciprocalPercentage.js +18 -0
- package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/valuePercent.js +7 -0
- package/lib/exercises/math/powers/calculateNegativePower.js +0 -1
- package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
- package/lib/exercises/math/powers/decimalToScientific.js +0 -1
- package/lib/exercises/math/powers/powersPower.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersPower.js +0 -1
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +22 -0
- package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/scientificToDecimal.js +0 -2
- package/lib/exercises/math/primitive/expUPrimitive.js +0 -1
- package/lib/exercises/math/primitive/exponentialPrimitive.js +0 -1
- package/lib/exercises/math/primitive/logarithmePrimitive.js +0 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +0 -1
- package/lib/exercises/math/primitive/sinCosPrimitive.js +0 -1
- package/lib/exercises/math/primitive/sinUCosUPrimitive.js +0 -1
- package/lib/exercises/math/probaStat/cardBasicProbas.js +0 -1
- package/lib/exercises/math/probaStat/diceBasicProbas.js +0 -1
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.js +14 -2
- package/lib/exercises/math/probaStat/probabilityTree.js +0 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -4
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.js +21 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +15 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +17 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +0 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts +10 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +48 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +14 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +15 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +0 -1
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts +10 -0
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +48 -0
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts +8 -0
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.js +46 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts +2 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +2 -0
- package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts +2 -3
- package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.js +23 -91
- package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts +10 -0
- package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -0
- package/lib/exercises/math/sets/intervals/intervalToInequality.js +112 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +15 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +26 -1
- package/lib/exercises/math/squareRoots/squareRootsSum.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootsSum.js +0 -1
- package/lib/exercises/math/suites/sequenceEvaluation.js +1 -1
- package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
- package/lib/exercises/math/suites/sequencePlot.js +10 -3
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +0 -1
- package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -1
- package/lib/exercises/pc/energy/energyTransfer.js +0 -1
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +0 -1
- package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -1
- package/lib/exercises/pc/mecanicalWaves/elongationReading.js +0 -1
- package/lib/index.d.ts +72 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +0 -2
- package/lib/math/geometry/spaceVector.d.ts +1 -0
- package/lib/math/geometry/spaceVector.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.js +3 -0
- package/lib/math/polynomials/trinom.js +2 -2
- package/lib/pc/constants/molecularChemistry/reaction.js +3 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +2 -14
- package/lib/server.d.ts +1 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +4 -1
- package/lib/tree/nodes/sets/closure.d.ts +2 -0
- package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
- package/lib/tree/nodes/sets/closure.js +24 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts +3 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +13 -0
- package/lib/tree/parsers/latexParser.js +6 -6
- package/lib/utils/numberPrototype/toSeparatedThousands.d.ts +2 -0
- package/lib/utils/numberPrototype/toSeparatedThousands.d.ts.map +1 -0
- package/lib/utils/numberPrototype/toSeparatedThousands.js +12 -0
- package/package.json +1 -1
|
@@ -4,22 +4,14 @@ exports.inequalityToInterval = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const intervals_1 = require("../../../../math/sets/intervals/intervals");
|
|
7
|
-
const inequationNode_1 = require("../../../../tree/nodes/inequations/inequationNode");
|
|
8
|
-
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
7
|
const belongsNode_1 = require("../../../../tree/nodes/sets/belongsNode");
|
|
10
8
|
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
11
|
-
const coinFlip_1 = require("../../../../utils/coinFlip");
|
|
12
9
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
13
10
|
const getInequalityToIntervalQuestion = () => {
|
|
14
|
-
const isIntervalToInequality = (0, coinFlip_1.coinFlip)();
|
|
15
11
|
const interval = intervals_1.IntervalConstructor.random();
|
|
16
12
|
const inequalityString = interval.toInequality();
|
|
17
|
-
const answer =
|
|
18
|
-
|
|
19
|
-
: `x\\in${interval.toTex()}`;
|
|
20
|
-
const instruction = isIntervalToInequality
|
|
21
|
-
? `Soit $x \\in ${interval.toTex()}$. Traduire cette appartenance en une inégalité.`
|
|
22
|
-
: `Soit $${inequalityString}$. Traduire cette inégalité en appartenance à un intervalle.`;
|
|
13
|
+
const answer = `x\\in${interval.toTex()}`;
|
|
14
|
+
const instruction = `Soit $${inequalityString}$. Traduire cette inégalité en appartenance à un intervalle.`;
|
|
23
15
|
const question = {
|
|
24
16
|
answer,
|
|
25
17
|
instruction: instruction,
|
|
@@ -37,100 +29,40 @@ const getInequalityToIntervalQuestion = () => {
|
|
|
37
29
|
],
|
|
38
30
|
answerFormat: "tex",
|
|
39
31
|
identifiers: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
intervalMax: interval.max,
|
|
32
|
+
intervalMin: interval.min === -Infinity ? "-infty" : interval.min,
|
|
33
|
+
intervalMax: interval.max === Infinity ? "infty" : interval.max,
|
|
43
34
|
intervalClosure: interval.closure,
|
|
44
35
|
},
|
|
45
36
|
};
|
|
46
37
|
return question;
|
|
47
38
|
};
|
|
48
|
-
const getPropositions = (n, { answer,
|
|
39
|
+
const getPropositions = (n, { answer, intervalClosure, intervalMax, intervalMin }) => {
|
|
49
40
|
const reverseBracket = (bracket) => {
|
|
50
41
|
return bracket === "[" ? "]" : "[";
|
|
51
42
|
};
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (symbol === "<")
|
|
56
|
-
return "\\le";
|
|
57
|
-
if (symbol === ">")
|
|
58
|
-
return "\\ge";
|
|
59
|
-
return ">";
|
|
60
|
-
};
|
|
61
|
-
const reverseInequality = (symbol) => {
|
|
62
|
-
if (symbol === "\\le")
|
|
63
|
-
return "\\ge";
|
|
64
|
-
if (symbol === "<")
|
|
65
|
-
return ">";
|
|
66
|
-
if (symbol === ">")
|
|
67
|
-
return "<";
|
|
68
|
-
return "\\le";
|
|
69
|
-
};
|
|
70
|
-
const interval = new intervals_1.Interval(intervalMin.toTree(), intervalMax.toTree(), intervalClosure);
|
|
43
|
+
const min = intervalMin === "-infty" ? -Infinity : intervalMin;
|
|
44
|
+
const max = intervalMax === "infty" ? Infinity : intervalMax;
|
|
45
|
+
const interval = new intervals_1.Interval(min.toTree(), max.toTree(), intervalClosure);
|
|
71
46
|
const propositions = [];
|
|
72
47
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
];
|
|
82
|
-
}
|
|
83
|
-
else if (interval.max === Infinity) {
|
|
84
|
-
wrongIneqs = [
|
|
85
|
-
new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], switchInclusion(interval.leftInequalitySymbol)),
|
|
86
|
-
new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], reverseInequality(switchInclusion(interval.leftInequalitySymbol))),
|
|
87
|
-
new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], reverseInequality(interval.leftInequalitySymbol)),
|
|
88
|
-
];
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
wrongIneqs = [
|
|
92
|
-
new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
|
|
93
|
-
switchInclusion(interval.leftInequalitySymbol),
|
|
94
|
-
interval.rightInequalitySymbol,
|
|
95
|
-
]),
|
|
96
|
-
new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
|
|
97
|
-
interval.leftInequalitySymbol,
|
|
98
|
-
switchInclusion(interval.rightInequalitySymbol),
|
|
99
|
-
]),
|
|
100
|
-
new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
|
|
101
|
-
switchInclusion(interval.leftInequalitySymbol),
|
|
102
|
-
switchInclusion(interval.rightInequalitySymbol),
|
|
103
|
-
]),
|
|
104
|
-
];
|
|
105
|
-
}
|
|
106
|
-
wrongIneqs.forEach((ineq) => {
|
|
107
|
-
(0, exercise_1.addWrongProp)(propositions, ineq.toTex());
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
const wrongStatements = [
|
|
112
|
-
`x\\in${reverseBracket(interval.leftBracket)}${interval.insideToTex()}${interval.rightBracket}`,
|
|
113
|
-
`x\\in${interval.leftBracket}${interval.insideToTex()}${reverseBracket(interval.rightBracket)}`,
|
|
114
|
-
`x\\in${reverseBracket(interval.leftBracket)}${interval.insideToTex()}${reverseBracket(interval.rightBracket)}`,
|
|
115
|
-
];
|
|
116
|
-
wrongStatements.forEach((ineq) => {
|
|
117
|
-
(0, exercise_1.addWrongProp)(propositions, ineq);
|
|
118
|
-
});
|
|
119
|
-
}
|
|
48
|
+
const wrongStatements = [
|
|
49
|
+
`x\\in${reverseBracket(interval.leftBracket)}${interval.insideToTex()}${interval.rightBracket}`,
|
|
50
|
+
`x\\in${interval.leftBracket}${interval.insideToTex()}${reverseBracket(interval.rightBracket)}`,
|
|
51
|
+
`x\\in${reverseBracket(interval.leftBracket)}${interval.insideToTex()}${reverseBracket(interval.rightBracket)}`,
|
|
52
|
+
];
|
|
53
|
+
wrongStatements.forEach((ineq) => {
|
|
54
|
+
(0, exercise_1.addWrongProp)(propositions, ineq);
|
|
55
|
+
});
|
|
120
56
|
return (0, shuffle_1.shuffle)(propositions);
|
|
121
57
|
};
|
|
122
|
-
const isAnswerValid = (ans, { intervalClosure, intervalMax, intervalMin
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
const answer =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
allowRawRightChildAsSolution: true,
|
|
130
|
-
});
|
|
131
|
-
console.log("ans", answer);
|
|
58
|
+
const isAnswerValid = (ans, { intervalClosure, intervalMax, intervalMin }) => {
|
|
59
|
+
const min = intervalMin === "-infty" ? -Infinity : intervalMin;
|
|
60
|
+
const max = intervalMax === "infty" ? Infinity : intervalMax;
|
|
61
|
+
const interval = new intervals_1.Interval(min.toTree(), max.toTree(), intervalClosure).toTree();
|
|
62
|
+
const answer = new belongsNode_1.BelongsNode(new variableNode_1.VariableNode("x"), interval, {
|
|
63
|
+
allowRawRightChildAsSolution: true,
|
|
64
|
+
});
|
|
132
65
|
const texs = answer.toAllValidTexs();
|
|
133
|
-
console.log("texs", texs);
|
|
134
66
|
return texs.includes(ans);
|
|
135
67
|
};
|
|
136
68
|
exports.inequalityToInterval = {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { ClosureType } from "../../../../tree/nodes/sets/closure";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
intervalMin: number | string;
|
|
5
|
+
intervalMax: number | string;
|
|
6
|
+
intervalClosure: ClosureType;
|
|
7
|
+
};
|
|
8
|
+
export declare const inequalityToInterval: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=intervalToInequality.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intervalToInequality.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/intervalToInequality.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAK5D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,eAAe,EAAE,WAAW,CAAC;CAC9B,CAAC;AAkIF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inequalityToInterval = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const intervals_1 = require("../../../../math/sets/intervals/intervals");
|
|
7
|
+
const inequationNode_1 = require("../../../../tree/nodes/inequations/inequationNode");
|
|
8
|
+
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
10
|
+
const shuffle_1 = require("../../../../utils/shuffle");
|
|
11
|
+
const getIntervalToInequalityQuestion = () => {
|
|
12
|
+
const interval = intervals_1.IntervalConstructor.random();
|
|
13
|
+
const inequalityString = interval.toInequality();
|
|
14
|
+
const answer = inequalityString;
|
|
15
|
+
const instruction = `Soit $x \\in ${interval.toTex()}$. Traduire cette appartenance en une inégalité.`;
|
|
16
|
+
const question = {
|
|
17
|
+
answer,
|
|
18
|
+
instruction: instruction,
|
|
19
|
+
keys: ["x", "inf", "sup", "geq", "leq", "infty"],
|
|
20
|
+
answerFormat: "tex",
|
|
21
|
+
identifiers: {
|
|
22
|
+
intervalMin: interval.min === -Infinity ? "-infty" : interval.min,
|
|
23
|
+
intervalMax: interval.max === Infinity ? "infty" : interval.max,
|
|
24
|
+
intervalClosure: interval.closure,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
return question;
|
|
28
|
+
};
|
|
29
|
+
const getPropositions = (n, { answer, intervalClosure, intervalMax, intervalMin }) => {
|
|
30
|
+
const switchInclusion = (symbol) => {
|
|
31
|
+
if (symbol === "\\le")
|
|
32
|
+
return "<";
|
|
33
|
+
if (symbol === "<")
|
|
34
|
+
return "\\le";
|
|
35
|
+
if (symbol === ">")
|
|
36
|
+
return "\\ge";
|
|
37
|
+
return ">";
|
|
38
|
+
};
|
|
39
|
+
const reverseInequality = (symbol) => {
|
|
40
|
+
if (symbol === "\\le")
|
|
41
|
+
return "\\ge";
|
|
42
|
+
if (symbol === "<")
|
|
43
|
+
return ">";
|
|
44
|
+
if (symbol === ">")
|
|
45
|
+
return "<";
|
|
46
|
+
return "\\le";
|
|
47
|
+
};
|
|
48
|
+
const min = intervalMin === "-infty" ? -Infinity : intervalMin;
|
|
49
|
+
const max = intervalMax === "infty" ? Infinity : intervalMax;
|
|
50
|
+
const interval = new intervals_1.Interval(min.toTree(), max.toTree(), intervalClosure);
|
|
51
|
+
const propositions = [];
|
|
52
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
53
|
+
const xNode = new variableNode_1.VariableNode("x");
|
|
54
|
+
let wrongIneqs = [];
|
|
55
|
+
if (interval.min === -Infinity) {
|
|
56
|
+
wrongIneqs = [
|
|
57
|
+
new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], switchInclusion(interval.rightInequalitySymbol)),
|
|
58
|
+
new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], reverseInequality(switchInclusion(interval.rightInequalitySymbol))),
|
|
59
|
+
new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], reverseInequality(interval.rightInequalitySymbol)),
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
else if (interval.max === Infinity) {
|
|
63
|
+
wrongIneqs = [
|
|
64
|
+
new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], switchInclusion(interval.leftInequalitySymbol)),
|
|
65
|
+
new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], reverseInequality(switchInclusion(interval.leftInequalitySymbol))),
|
|
66
|
+
new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], interval.leftInequalitySymbol),
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
wrongIneqs = [
|
|
71
|
+
new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
|
|
72
|
+
switchInclusion(interval.leftInequalitySymbol),
|
|
73
|
+
interval.rightInequalitySymbol,
|
|
74
|
+
]),
|
|
75
|
+
new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
|
|
76
|
+
interval.leftInequalitySymbol,
|
|
77
|
+
switchInclusion(interval.rightInequalitySymbol),
|
|
78
|
+
]),
|
|
79
|
+
new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
|
|
80
|
+
switchInclusion(interval.leftInequalitySymbol),
|
|
81
|
+
switchInclusion(interval.rightInequalitySymbol),
|
|
82
|
+
]),
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
wrongIneqs.forEach((ineq) => {
|
|
86
|
+
(0, exercise_1.addWrongProp)(propositions, ineq.toTex());
|
|
87
|
+
});
|
|
88
|
+
return (0, shuffle_1.shuffle)(propositions);
|
|
89
|
+
};
|
|
90
|
+
const isAnswerValid = (ans, { intervalClosure, intervalMax, intervalMin }) => {
|
|
91
|
+
const min = intervalMin === "-infty" ? -Infinity : intervalMin;
|
|
92
|
+
const max = intervalMax === "infty" ? Infinity : intervalMax;
|
|
93
|
+
const interval = new intervals_1.Interval(min.toTree(), max.toTree(), intervalClosure).toTree();
|
|
94
|
+
const inequality = interval.toInequality();
|
|
95
|
+
const answer = inequality;
|
|
96
|
+
const texs = answer.toAllValidTexs();
|
|
97
|
+
return texs.includes(ans);
|
|
98
|
+
};
|
|
99
|
+
exports.inequalityToInterval = {
|
|
100
|
+
id: "intervalToInequality",
|
|
101
|
+
connector: "=",
|
|
102
|
+
label: "Traduire un intervalle en inégalité",
|
|
103
|
+
levels: ["2ndPro", "2nde", "CAP", "1reESM"],
|
|
104
|
+
isSingleStep: true,
|
|
105
|
+
sections: ["Ensembles et intervalles"],
|
|
106
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIntervalToInequalityQuestion, nb),
|
|
107
|
+
qcmTimer: 60,
|
|
108
|
+
freeTimer: 60,
|
|
109
|
+
getPropositions,
|
|
110
|
+
isAnswerValid,
|
|
111
|
+
subject: "Mathématiques",
|
|
112
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spaceVectorCoordinatesFromPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"spaceVectorCoordinatesFromPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAmEtB,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAgBlE,CAAC"}
|
|
@@ -5,6 +5,8 @@ const exercise_1 = require("../../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const spacePoint_1 = require("../../../../math/geometry/spacePoint");
|
|
7
7
|
const spaceVector_1 = require("../../../../math/geometry/spaceVector");
|
|
8
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
9
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
8
10
|
const getSpaceVectorCoordinatesFromPointsQuestion = () => {
|
|
9
11
|
const points = spacePoint_1.SpacePointConstructor.randomDifferent(["A", "B"]);
|
|
10
12
|
const vector = spaceVector_1.SpaceVectorConstructor.fromPoints(points[0], points[1]);
|
|
@@ -22,6 +24,18 @@ const getSpaceVectorCoordinatesFromPointsQuestion = () => {
|
|
|
22
24
|
by: points[1].y.evaluate({}),
|
|
23
25
|
bz: points[1].z.evaluate({}),
|
|
24
26
|
},
|
|
27
|
+
hint: `Soient deux points $M(x_M;y_M;z_M)$ et $N(x_N;y_N;z_N)$, alors le vecteur $\\overrightarrow{MN}$ a pour coordonnées :
|
|
28
|
+
|
|
29
|
+
$\\overrightarrow{MN} \\begin{pmatrix} x_N - x_M \\\\ y_N - y_M \\\\ z_N - z_M \\end{pmatrix}$`,
|
|
30
|
+
correction: `Les coordonnées du vecteur $\\overrightarrow{AB}$ sont :
|
|
31
|
+
|
|
32
|
+
${(0, alignTex_1.alignTex)([
|
|
33
|
+
[
|
|
34
|
+
`\\begin{pmatrix} ${new substractNode_1.SubstractNode(points[1].x, points[0].x).toTex()} \\\\ ${new substractNode_1.SubstractNode(points[1].y, points[0].y).toTex()} \\\\ ${new substractNode_1.SubstractNode(points[1].z, points[0].z).toTex()} \\end{pmatrix}`,
|
|
35
|
+
"=",
|
|
36
|
+
vector.toCoordsTex(),
|
|
37
|
+
],
|
|
38
|
+
])}`,
|
|
25
39
|
};
|
|
26
40
|
return question;
|
|
27
41
|
};
|
|
@@ -49,4 +63,5 @@ exports.spaceVectorCoordinatesFromPoints = {
|
|
|
49
63
|
getPropositions,
|
|
50
64
|
isAnswerValid,
|
|
51
65
|
subject: "Mathématiques",
|
|
66
|
+
hasHintAndCorrection: true,
|
|
52
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spaceVectorNormCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"spaceVectorNormCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwEF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
|
|
@@ -6,11 +6,15 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
|
|
|
6
6
|
const spaceVector_1 = require("../../../../math/geometry/spaceVector");
|
|
7
7
|
const real_1 = require("../../../../math/numbers/reals/real");
|
|
8
8
|
const sqrtNode_1 = require("../../../../tree/nodes/functions/sqrtNode");
|
|
9
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
|
+
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
9
12
|
const getSpaceVectorNormCalculationQuestion = () => {
|
|
10
13
|
const u = spaceVector_1.SpaceVectorConstructor.random("u", false);
|
|
11
14
|
const correctAnswer = u.getNorm();
|
|
15
|
+
const answer = correctAnswer.simplify().toTex();
|
|
12
16
|
const question = {
|
|
13
|
-
answer
|
|
17
|
+
answer,
|
|
14
18
|
instruction: `Cacluler la norme du vecteur $${u.toTexWithCoords()}$`,
|
|
15
19
|
keys: [],
|
|
16
20
|
answerFormat: "tex",
|
|
@@ -19,6 +23,26 @@ const getSpaceVectorNormCalculationQuestion = () => {
|
|
|
19
23
|
y: u.y.evaluate({}),
|
|
20
24
|
z: u.z.evaluate({}),
|
|
21
25
|
},
|
|
26
|
+
hint: "La norme d'un vecteur de l'espace est la racine carrée de la somme des carrés de ses coordonnées.",
|
|
27
|
+
correction: `La norme d'un vecteur de l'espace est la racine carrée de la somme des carrés de ses coordonnées. Ici, on a donc :
|
|
28
|
+
|
|
29
|
+
${(0, alignTex_1.alignTex)([
|
|
30
|
+
[
|
|
31
|
+
"\\lVert \\overrightarrow u \\rVert",
|
|
32
|
+
"=",
|
|
33
|
+
new sqrtNode_1.SqrtNode(new addNode_1.AddNode(new powerNode_1.SquareNode(u.x), new addNode_1.AddNode(new powerNode_1.SquareNode(u.y), new powerNode_1.SquareNode(u.z)))).toTex(),
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"",
|
|
37
|
+
"=",
|
|
38
|
+
new sqrtNode_1.SqrtNode((u.x.evaluate({}) ** 2 +
|
|
39
|
+
u.y.evaluate({}) ** 2 +
|
|
40
|
+
u.z.evaluate({}) ** 2).toTree()).toTex(),
|
|
41
|
+
],
|
|
42
|
+
])}
|
|
43
|
+
|
|
44
|
+
Donc $\\lVert \\overrightarrow u \\rVert = ${answer}$.
|
|
45
|
+
`,
|
|
22
46
|
};
|
|
23
47
|
return question;
|
|
24
48
|
};
|
|
@@ -51,4 +75,5 @@ exports.spaceVectorNormCalculation = {
|
|
|
51
75
|
getPropositions,
|
|
52
76
|
isAnswerValid,
|
|
53
77
|
subject: "Mathématiques",
|
|
78
|
+
hasHintAndCorrection: true,
|
|
54
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"squareRootsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/squareRoots/squareRootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"squareRootsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/squareRoots/squareRootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvB,CAAC;AA8EF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -62,7 +62,6 @@ const isAnswerValid = (ans, { answer, a, b, c, d, y, x, z }) => {
|
|
|
62
62
|
}
|
|
63
63
|
const tree = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(b))).simplify();
|
|
64
64
|
const texs = tree.toAllValidTexs();
|
|
65
|
-
console.log("vea SumSQRT answer: ", answer, "texs : ", texs);
|
|
66
65
|
return texs.includes(ans);
|
|
67
66
|
};
|
|
68
67
|
exports.squareRootsSum = {
|
|
@@ -130,7 +130,7 @@ const isAnswerValid = (ans, { affine, termeid, termeAdd, termeMult }) => {
|
|
|
130
130
|
};
|
|
131
131
|
exports.sequenceEvaluation = {
|
|
132
132
|
id: "sequenceEvaluation",
|
|
133
|
-
label: "
|
|
133
|
+
label: "Exprimer $u_{f(n)}$ en connaissant $u_n$",
|
|
134
134
|
levels: ["1reSpé"],
|
|
135
135
|
isSingleStep: true,
|
|
136
136
|
sections: ["Suites"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencePlot.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/suites/sequencePlot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"sequencePlot.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/suites/sequencePlot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AA2FF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAe9C,CAAC"}
|
|
@@ -16,11 +16,11 @@ const getSequencePlotQuestion = () => {
|
|
|
16
16
|
for (let n = 0; n <= nMax; n++) {
|
|
17
17
|
let u_n;
|
|
18
18
|
if (isArithmetic) {
|
|
19
|
-
const noise = (0, randfloat_1.randfloat)(-
|
|
19
|
+
const noise = (0, randfloat_1.randfloat)(-2, 2, 1);
|
|
20
20
|
u_n = a * n + b + noise;
|
|
21
21
|
}
|
|
22
22
|
else {
|
|
23
|
-
const noise = (0, randfloat_1.randfloat)(-
|
|
23
|
+
const noise = (0, randfloat_1.randfloat)(-2, 2, 1);
|
|
24
24
|
u_n = b * Math.pow(a, n) + noise;
|
|
25
25
|
}
|
|
26
26
|
points.push([n, Math.round(u_n)]);
|
|
@@ -41,8 +41,9 @@ const getSequencePlotQuestion = () => {
|
|
|
41
41
|
isXAxesNatural: true,
|
|
42
42
|
isGridSimple: true,
|
|
43
43
|
});
|
|
44
|
+
const answer = u_nValue.toString();
|
|
44
45
|
const question = {
|
|
45
|
-
answer
|
|
46
|
+
answer,
|
|
46
47
|
instruction: `Ci-dessous est tracé un nuage de points représentant les valeurs d'une suite $(u_n)$. Quelle est la valeur de $u_{${nValue}}$ ?`,
|
|
47
48
|
commands: ggb.commands,
|
|
48
49
|
options: ggb.getOptions(),
|
|
@@ -55,6 +56,11 @@ const getSequencePlotQuestion = () => {
|
|
|
55
56
|
keys: [],
|
|
56
57
|
answerFormat: "raw",
|
|
57
58
|
identifiers: { nValue, points, isArithmetic },
|
|
59
|
+
hint: `$u_{${nValue}}$ est l'ordonnée du point d'absicsse $${nValue}$ dans le nuage de points.`,
|
|
60
|
+
correction: `$u_{${nValue}}$ est l'ordonnée du point d'absicsse $${nValue}$ dans le nuage de points.
|
|
61
|
+
|
|
62
|
+
On lit donc : $u_{${nValue}}=${answer}$.
|
|
63
|
+
`,
|
|
58
64
|
};
|
|
59
65
|
return question;
|
|
60
66
|
};
|
|
@@ -84,4 +90,5 @@ exports.sequencePlot = {
|
|
|
84
90
|
getPropositions,
|
|
85
91
|
isAnswerValid,
|
|
86
92
|
subject: "Mathématiques",
|
|
93
|
+
hasHintAndCorrection: true,
|
|
87
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findAtomEntitiesNumberFromMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAMhF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"findAtomEntitiesNumberFromMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAMhF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAsEF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
|
|
@@ -18,7 +18,6 @@ const getFindAtomEntitiesNumberFromMassQuestion = () => {
|
|
|
18
18
|
const sampleMassMeasure = new measure_1.Measure(sampleMass, 0, massUnits_1.MassUnit.kg);
|
|
19
19
|
const atomMass = atoms_1.nucleonMass.value.times(atom.masseAtomique).toSignificant(2);
|
|
20
20
|
const entitiesNumber = sampleMassMeasure.divide(atomMass).toSignificant(2);
|
|
21
|
-
console.log("entitiesNumber", entitiesNumber);
|
|
22
21
|
const instruction = `Un échantillon a une masse $m = ${sampleMassMeasure.toTex()}$ ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name}. La masse d'un atome ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} est de $${atomMass.toTex({ scientific: 2 })}$.
|
|
23
22
|
Déterminer le nombre d'atomes ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} composant l'échantillon.`;
|
|
24
23
|
const question = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energyTransfer.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/energyTransfer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"energyTransfer.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/energyTransfer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAgEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -49,7 +49,6 @@ const isAnswerValid = (ans, { answer, energy }) => {
|
|
|
49
49
|
const validanswer2 = energy.toTree().toAllValidTexs();
|
|
50
50
|
let latexs = [];
|
|
51
51
|
latexs.push(validanswer1, ...validanswer2);
|
|
52
|
-
console.log(latexs);
|
|
53
52
|
return latexs.includes(ans);
|
|
54
53
|
};
|
|
55
54
|
exports.energyTransfer = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gravitationalAttractionObjectHeight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/gravitationalAttractionObjectHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"gravitationalAttractionObjectHeight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/gravitationalAttractionObjectHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgIF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAerE,CAAC"}
|
|
@@ -112,7 +112,6 @@ const isAnswerValid = (ans, { answer, h }) => {
|
|
|
112
112
|
validanswer2.toSignificant(2).toTex({ hideUnit: true }),
|
|
113
113
|
validanswer3.toSignificant(2).toTex({ hideUnit: true }),
|
|
114
114
|
];
|
|
115
|
-
console.log(latexs);
|
|
116
115
|
return latexs.includes(ans);
|
|
117
116
|
};
|
|
118
117
|
exports.gravitationalAttractionObjectHeight = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elongationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mecanicalWaves/elongationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"elongationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mecanicalWaves/elongationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA4FF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
|
|
@@ -54,7 +54,6 @@ const isAnswerValid = (ans, { answer, amplitude, period }) => {
|
|
|
54
54
|
const node = new multiplyNode_1.MultiplyNode(amplitude.toTree(), new cosNode_1.CosNode(new multiplyNode_1.MultiplyNode(frac, new variableNode_1.VariableNode("t"))));
|
|
55
55
|
const equal = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y\\left(t\\right)"), node);
|
|
56
56
|
const texs = equal.toAllValidTexs({ allowRawRightChildAsSolution: true });
|
|
57
|
-
console.log(texs);
|
|
58
57
|
return texs.includes(ans);
|
|
59
58
|
};
|
|
60
59
|
exports.elongationReading = {
|