math-exercises 2.2.7 → 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/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/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/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/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/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/findProportion.d.ts.map +1 -1
- package/lib/exercises/math/percent/findProportion.js +1 -1
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +0 -1
- 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/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/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/sequences/arithmetic/arithmeticFindExplicitFormula.js +0 -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.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +0 -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/squareRoots/squareRootsSum.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootsSum.js +0 -1
- 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 +29 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +0 -2
- package/lib/pc/constants/molecularChemistry/reaction.js +3 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +2 -2
- 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/package.json +1 -1
|
@@ -8,7 +8,6 @@ const exercise_1 = require("../../exercise");
|
|
|
8
8
|
const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
9
9
|
const units = ["mg", "cg", "dg", "g", "dag", "hg", "kg"];
|
|
10
10
|
const getMassConversion = () => {
|
|
11
|
-
console.log("mass conv gen");
|
|
12
11
|
const randomUnitIndex = (0, randint_1.randint)(0, 7);
|
|
13
12
|
const randomUnitInstructionIndex = (0, randint_1.randint)(0, 7, [randomUnitIndex]);
|
|
14
13
|
const randomMass = decimal_1.DecimalConstructor.random(0, 1000, (0, randint_1.randint)(0, 4));
|
|
@@ -33,7 +32,6 @@ const getPropositions = (n, { answer, randomMass, randomUnitIndex, randomUnitIns
|
|
|
33
32
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
34
33
|
const massDecimal = new decimal_1.Decimal(randomMass);
|
|
35
34
|
while (propositions.length < n) {
|
|
36
|
-
console.log("mass conv prop");
|
|
37
35
|
const wrongAnswer = massDecimal
|
|
38
36
|
.multiplyByPowerOfTen((0, randint_1.randint)(-3, 4, [randomUnitIndex - randomUnitInstructionIndex]))
|
|
39
37
|
.value.toString()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeCapacityConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/volumeCapacityConversion.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"volumeCapacityConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/volumeCapacityConversion.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAkEF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAe1D,CAAC"}
|
|
@@ -10,7 +10,6 @@ const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
|
10
10
|
const volumeUnits = ["mm", "cm", "dm", "m", "dam", "hm", "km"];
|
|
11
11
|
const capacityUnits = ["mL", "cL", "dL", "L", "daL", "hL", "kL"];
|
|
12
12
|
const getVolumeCapacityConversion = () => {
|
|
13
|
-
console.log("volume capacity q");
|
|
14
13
|
const randomUnitInstructionIndex = (0, randint_1.randint)(0, 7);
|
|
15
14
|
const randomUnitIndex = (0, randint_1.randint)(
|
|
16
15
|
// cette manip a pour but d'éviter des conversion avec des nombres trop grand/petit
|
|
@@ -52,7 +51,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
52
51
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
53
52
|
const decimal = new decimal_1.Decimal(Number(answer.replace(",", ".")));
|
|
54
53
|
while (propositions.length < n) {
|
|
55
|
-
console.log("volume capactiy conv qcm");
|
|
56
54
|
const wrongAnswer = decimal.multiplyByPowerOfTen((0, randint_1.randint)(-3, 4, [0]));
|
|
57
55
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toTree().toTex());
|
|
58
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/volumeConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"volumeConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/volumeConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AA4DF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
|
|
@@ -8,7 +8,6 @@ const exercise_1 = require("../../exercise");
|
|
|
8
8
|
const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
9
9
|
const units = ["mm", "cm", "dm", "m", "dam", "hm", "km"];
|
|
10
10
|
const getVolumeConversion = () => {
|
|
11
|
-
console.log("volume conv q");
|
|
12
11
|
const randomUnitIndex = (0, randint_1.randint)(0, 7);
|
|
13
12
|
const randomUnitInstructionIndex = (0, randint_1.randint)(
|
|
14
13
|
// cette manip a pour but d'éviter des conversion de type km³ --> cm³ ou le contraire (chiffre trop grand/petit)
|
|
@@ -35,7 +34,6 @@ const getPropositions = (n, { answer, randomUnitIndex, randomUnitInstructionInde
|
|
|
35
34
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
36
35
|
const volumeDecimal = new decimal_1.Decimal(randomVolume);
|
|
37
36
|
while (propositions.length < n) {
|
|
38
|
-
console.log("volume conv qcm");
|
|
39
37
|
const wrongAnswer = volumeDecimal
|
|
40
38
|
.multiplyByPowerOfTen((0, randint_1.randint)(-3, 4, [randomUnitIndex - randomUnitInstructionIndex]))
|
|
41
39
|
.value.toString()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/expDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"expDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/expDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -44,7 +44,6 @@ const isAnswerValid = (ans, { a, b }) => {
|
|
|
44
44
|
const myfunction = new expNode_1.ExpNode(affine.toTree());
|
|
45
45
|
const derivative = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), myfunction);
|
|
46
46
|
const texs = derivative.toAllValidTexs();
|
|
47
|
-
console.log(ans, texs);
|
|
48
47
|
return texs.includes(ans);
|
|
49
48
|
};
|
|
50
49
|
exports.expDerivativeOne = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0CF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
|
|
@@ -37,7 +37,6 @@ const getPropositions = (n, { answer, a }) => {
|
|
|
37
37
|
const isAnswerValid = (ans, { a }) => {
|
|
38
38
|
const answerTree = new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-a), new powerNode_1.SquareNode(new variableNode_1.VariableNode("x")));
|
|
39
39
|
const texs = answerTree.toAllValidTexs();
|
|
40
|
-
console.log(texs);
|
|
41
40
|
return texs.includes(ans);
|
|
42
41
|
};
|
|
43
42
|
exports.inverseFunctionDerivative = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lnDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/lnDerivativeOne.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;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"lnDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/lnDerivativeOne.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;CACX,CAAC;AAoDF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6FF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/powerCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"powerCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/powerCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA0EF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
|
|
@@ -24,7 +24,6 @@ const getPowerCompositionDerivationQuestion = () => {
|
|
|
24
24
|
return question;
|
|
25
25
|
};
|
|
26
26
|
const getPropositions = (n, { answer, affineA, affineB, power }) => {
|
|
27
|
-
console.log("qcm");
|
|
28
27
|
const propositions = [];
|
|
29
28
|
const affineTree = new affine_1.Affine(affineA, affineB).toTree();
|
|
30
29
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
@@ -36,7 +35,6 @@ const getPropositions = (n, { answer, affineA, affineB, power }) => {
|
|
|
36
35
|
(0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode((power * affineA).toTree(), powerN).toTex());
|
|
37
36
|
while (propositions.length < n) {
|
|
38
37
|
(0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode((0, randint_1.randint)(-10, 10).toTree(), powerN).toTex());
|
|
39
|
-
console.log("prop");
|
|
40
38
|
}
|
|
41
39
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
42
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/powerFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"powerFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/powerFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA+GF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
|
|
@@ -53,7 +53,6 @@ const isAnswerValid = (ans, { a, power }) => {
|
|
|
53
53
|
? new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a * power), new powerNode_1.PowerNode(new variableNode_1.VariableNode("x"), new numberNode_1.NumberNode(power - 1), opts), opts)
|
|
54
54
|
: new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a * power), new variableNode_1.VariableNode("x"), opts);
|
|
55
55
|
const texs = answerTree.toAllValidTexs();
|
|
56
|
-
console.log(texs);
|
|
57
56
|
return texs.includes(ans);
|
|
58
57
|
};
|
|
59
58
|
exports.powerFunctionDerivative = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotientDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/quotientDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"quotientDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/quotientDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAmFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
|
|
@@ -66,7 +66,6 @@ const isAnswerValid = (ans, { poly1Coeffs, poly2Coeffs }) => {
|
|
|
66
66
|
const answerDenum = new powerNode_1.PowerNode(poly2.toTree(), new numberNode_1.NumberNode(2));
|
|
67
67
|
const answer = new fractionNode_1.FractionNode(answerNum, answerDenum);
|
|
68
68
|
const texs = answer.toAllValidTexs();
|
|
69
|
-
console.log(ans, texs);
|
|
70
69
|
return texs.includes(ans);
|
|
71
70
|
};
|
|
72
71
|
exports.quotientDerivative = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/rootFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"rootFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/rootFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -60,7 +60,6 @@ const isAnswerValid = (ans, { a }) => {
|
|
|
60
60
|
else
|
|
61
61
|
answer = new fractionNode_1.FractionNode(new numberNode_1.NumberNode(a), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(2), new sqrtNode_1.SqrtNode(new variableNode_1.VariableNode("x"))));
|
|
62
62
|
const texs = answer.toAllValidTexs();
|
|
63
|
-
console.log(texs);
|
|
64
63
|
return texs.includes(ans);
|
|
65
64
|
};
|
|
66
65
|
exports.rootFunctionDerivative = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/secondDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,WAAW,CAkBpE,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,YAAY,CAC9D,WAAW,CA+BZ,CAAC;AACF,eAAO,MAAM,mCAAmC,EAAE,GAAG,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"secondDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/secondDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,WAAW,CAkBpE,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,YAAY,CAC9D,WAAW,CA+BZ,CAAC;AACF,eAAO,MAAM,mCAAmC,EAAE,GAAG,CAAC,WAAW,CAQhE,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAsBxD,CAAC"}
|
|
@@ -49,7 +49,6 @@ const isSecondDegreeDerivativeAnswerValid = (ans, { coefficients }) => {
|
|
|
49
49
|
const polynomial = new polynomial_1.Polynomial(coefficients);
|
|
50
50
|
const derivative = polynomial.derivate().toTree();
|
|
51
51
|
const texs = derivative.toAllValidTexs();
|
|
52
|
-
console.log(texs);
|
|
53
52
|
return texs.includes(ans);
|
|
54
53
|
};
|
|
55
54
|
exports.isSecondDegreeDerivativeAnswerValid = isSecondDegreeDerivativeAnswerValid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thirdDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAIJ,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAsBnE,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,YAAY,CAAC,WAAW,CAqC1E,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"thirdDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAIJ,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAsBnE,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,YAAY,CAAC,WAAW,CAqC1E,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,WAAW,CAQ/D,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAqBvD,CAAC"}
|
|
@@ -56,7 +56,6 @@ const isThirdDegreeDerivativeAnswerValid = (ans, { coefficients }) => {
|
|
|
56
56
|
const polynomial = new polynomial_1.Polynomial(coefficients);
|
|
57
57
|
const derivative = polynomial.derivate().toTree();
|
|
58
58
|
const texs = derivative.toAllValidTexs();
|
|
59
|
-
console.log(texs);
|
|
60
59
|
return texs.includes(ans);
|
|
61
60
|
};
|
|
62
61
|
exports.isThirdDegreeDerivativeAnswerValid = isThirdDegreeDerivativeAnswerValid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivativeNumberReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/derivation/derivativeNumberReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;CACb,CAAC;
|
|
1
|
+
{"version":3,"file":"derivativeNumberReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/derivation/derivativeNumberReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;CACb,CAAC;AA2FF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
|
|
@@ -47,7 +47,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
47
47
|
const isAnswerValid = (ans, { a }) => {
|
|
48
48
|
const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new multiplyNode_1.MultiplyNode(new variableNode_1.VariableNode("C"), new expNode_1.ExpNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode("x")))), { allowRawRightChildAsSolution: true });
|
|
49
49
|
const texs = answer.toAllValidTexs();
|
|
50
|
-
console.log(texs);
|
|
51
50
|
return texs.includes(ans);
|
|
52
51
|
};
|
|
53
52
|
exports.exponentialDifferentialEquation = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affineExpressionFromTwoImages.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionFromTwoImages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"affineExpressionFromTwoImages.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionFromTwoImages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA6EF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
|
|
@@ -21,7 +21,6 @@ const getAffineExpressionFromTwoImagesQuestion = () => {
|
|
|
21
21
|
const answer = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a, new variableNode_1.VariableNode("x")), b)
|
|
22
22
|
.simplify({ forceDistributeFractions: true })
|
|
23
23
|
.toTex();
|
|
24
|
-
console.log(a.toTex(), b.toTex());
|
|
25
24
|
const question = {
|
|
26
25
|
instruction: `Soit $f$ une fonction affine telle que $f(${xA}) = ${yA}$ et $f(${xB}) = ${yB}$.
|
|
27
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAM5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AAoLF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAenD,CAAC"}
|
|
@@ -120,10 +120,19 @@ const getPropositions = (n, { answer, intervals, splinePoints, yValue }) => {
|
|
|
120
120
|
const propositions = [];
|
|
121
121
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
122
122
|
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\varnothing`);
|
|
123
|
-
|
|
123
|
+
if (intervals.length === 1) {
|
|
124
|
+
const interval = new intervalNode_1.IntervalNode(intervals[0].a.toTree(), intervals[0].b.toTree(), intervals[0].closure);
|
|
125
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${interval.toRandomDifferentClosure().toTex()}`);
|
|
126
|
+
}
|
|
127
|
+
else if (intervals.length === 2) {
|
|
128
|
+
const rightIntervals = intervals.map((i) => new intervalNode_1.IntervalNode(i.a.toTree(), i.b.toTree(), i.closure));
|
|
129
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${rightIntervals[(0, coinFlip_1.coinFlip)() ? 0 : 1].toTex()}`);
|
|
130
|
+
}
|
|
124
131
|
while (propositions.length < n) {
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
let a = (0, randint_1.randint)(splinePoints[0][0], splinePoints[splinePoints.length - 1][0] + 1);
|
|
133
|
+
let b = (0, randint_1.randint)(splinePoints[0][0], splinePoints[splinePoints.length - 1][0] + 1, [a]);
|
|
134
|
+
if (a > b)
|
|
135
|
+
[a, b] = [b, a];
|
|
127
136
|
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b), closure_1.ClosureType.FF).toTex()}`);
|
|
128
137
|
}
|
|
129
138
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
@@ -36,7 +36,6 @@ const isAnswerValid = (ans, { k }) => {
|
|
|
36
36
|
const sol = Math.cbrt(k);
|
|
37
37
|
const answerTree = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode([new numberNode_1.NumberNode(sol)]));
|
|
38
38
|
const texs = answerTree.toAllValidTexs();
|
|
39
|
-
console.log(texs);
|
|
40
39
|
return texs.includes(ans);
|
|
41
40
|
};
|
|
42
41
|
exports.cubicEquation = {
|
|
@@ -57,7 +57,6 @@ const isAnswerValid = (ans, { a, k }) => {
|
|
|
57
57
|
.toTree({ allowFractionToDecimal: true })),
|
|
58
58
|
], { allowRawRightChildAsSolution: true }));
|
|
59
59
|
const texs = answer.toAllValidTexs();
|
|
60
|
-
console.log(texs);
|
|
61
60
|
return texs.includes(ans);
|
|
62
61
|
};
|
|
63
62
|
exports.expEquation = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log10PowerSimplifying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/log10PowerSimplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"log10PowerSimplifying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/log10PowerSimplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsDF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
|
|
@@ -10,7 +10,6 @@ const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
|
10
10
|
const alignTex_1 = require("../../../../utils/alignTex");
|
|
11
11
|
const getLog10PowerSimplifyingQuestion = () => {
|
|
12
12
|
const tenthPower = (0, randint_1.randint)(-6, 8, [1]);
|
|
13
|
-
console.log("log10 power simp q");
|
|
14
13
|
const nb = new decimal_1.Decimal(1).multiplyByPowerOfTen(tenthPower).toTree();
|
|
15
14
|
const answer = tenthPower + "";
|
|
16
15
|
const question = {
|
|
@@ -45,9 +44,9 @@ const getCorrection = (tenthPower, nb) => {
|
|
|
45
44
|
|
|
46
45
|
On a alors
|
|
47
46
|
${(0, alignTex_1.alignTex)([
|
|
48
|
-
[`\\log(${nb.toTex()})`,
|
|
49
|
-
["",
|
|
50
|
-
["",
|
|
47
|
+
[`\\log(${nb.toTex()})`, `=`, `\\log(${powerTen.toTex()})`],
|
|
48
|
+
["", "=", `${tenthPower}\\times \\log(10)`],
|
|
49
|
+
["", "=", `${tenthPower}`],
|
|
51
50
|
])}
|
|
52
51
|
`;
|
|
53
52
|
};
|
|
@@ -52,7 +52,6 @@ const isAnswerValid = (ans, { a, b, c }) => {
|
|
|
52
52
|
const roots = trinom.getRootsNode();
|
|
53
53
|
const answer = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(roots));
|
|
54
54
|
const texs = answer.toAllValidTexs();
|
|
55
|
-
console.log(texs);
|
|
56
55
|
return texs.includes(ans);
|
|
57
56
|
};
|
|
58
57
|
exports.rootsFromFactorizedForm = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondDegreeInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/secondDegreeInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAc3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;
|
|
1
|
+
{"version":3,"file":"secondDegreeInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/secondDegreeInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAc3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAsHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -69,7 +69,6 @@ const getPropositions = (n, { answer, a, b, c, ineqType }) => {
|
|
|
69
69
|
const propositions = [];
|
|
70
70
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
71
71
|
const roots = new trinom_1.Trinom(a, b, c).getRootsNode();
|
|
72
|
-
console.log("prop", roots.length);
|
|
73
72
|
const ineq = new inequation_1.InequationSymbol(ineqType);
|
|
74
73
|
(0, exercise_1.tryToAddWrongProp)(propositions, getAnswer({ a: -a, ineqType: ineq, roots }).toTex());
|
|
75
74
|
(0, exercise_1.tryToAddWrongProp)(propositions, getAnswer({ a, ineqType: ineq.toStrictnessToggled(), roots }).toTex());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summitAbscissFromRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/summitAbscissFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"summitAbscissFromRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/summitAbscissFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8CF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
|
|
@@ -9,7 +9,6 @@ const randint_1 = require("../../../../math/utils/random/randint");
|
|
|
9
9
|
const getSummitAbscissFromRootsQuestion = () => {
|
|
10
10
|
const trinom = trinom_1.TrinomConstructor.randomNiceRoots(2);
|
|
11
11
|
const roots = trinom.getRoots();
|
|
12
|
-
console.log("roots", roots);
|
|
13
12
|
const answer = new rational_1.Rational(roots[0] + roots[1], 2)
|
|
14
13
|
.simplify()
|
|
15
14
|
.toTree()
|
|
@@ -36,7 +35,6 @@ const getPropositions = (n, { answer, a, b, c }) => {
|
|
|
36
35
|
};
|
|
37
36
|
const isAnswerValid = (ans, { answer, a, b, c }) => {
|
|
38
37
|
const trinom = new trinom_1.Trinom(a, b, c);
|
|
39
|
-
console.log(ans, answer);
|
|
40
38
|
const node = trinom.getAlphaNode();
|
|
41
39
|
const texs = node.toAllValidTexs({
|
|
42
40
|
allowFractionToDecimal: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triangleAreaV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleAreaV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"triangleAreaV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleAreaV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAgEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -38,7 +38,6 @@ const getTriangleAreaV2 = () => {
|
|
|
38
38
|
return question;
|
|
39
39
|
};
|
|
40
40
|
const getPropositions = (n, { answer, randomSide }) => {
|
|
41
|
-
console.log("props", answer, randomSide);
|
|
42
41
|
const propositions = [];
|
|
43
42
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
44
43
|
const area = Number(answer.split("\\text")[0]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distanceBetweenTwoPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"distanceBetweenTwoPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAgHF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
|
|
@@ -90,7 +90,6 @@ const isAnswerValid = (ans, { square }) => {
|
|
|
90
90
|
? new numberNode_1.NumberNode(sqrt)
|
|
91
91
|
: new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(square), { allowSimplifySqrt: true });
|
|
92
92
|
const texs = answer.toAllValidTexs();
|
|
93
|
-
console.log(texs);
|
|
94
93
|
return texs.includes(ans);
|
|
95
94
|
};
|
|
96
95
|
exports.pythagoreCalcul = {
|
|
@@ -116,7 +116,6 @@ const isAnswerValid = (ans, { vertices }) => {
|
|
|
116
116
|
new multiEqualNode_1.MultiEqualNode(fractions.map((frac) => frac.toInversed())),
|
|
117
117
|
];
|
|
118
118
|
const texs = [...answers[0].toAllValidTexs(), ...answers[1].toAllValidTexs()];
|
|
119
|
-
console.log(texs);
|
|
120
119
|
return texs.includes(ans);
|
|
121
120
|
};
|
|
122
121
|
exports.thales = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAkLF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
|
|
@@ -131,7 +131,6 @@ const isAnswerValid = (ans, { isAskingC, rand, rand2, sideLengths }) => {
|
|
|
131
131
|
.simplify()
|
|
132
132
|
.toTree();
|
|
133
133
|
const texs = answer.toAllValidTexs({ allowFractionToDecimal: true });
|
|
134
|
-
console.log(texs);
|
|
135
134
|
return texs.includes(ans);
|
|
136
135
|
};
|
|
137
136
|
exports.thalesCalcul = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alignementViaColinearity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/alignementViaColinearity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"alignementViaColinearity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/alignementViaColinearity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA8CF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAa1D,CAAC"}
|
|
@@ -16,12 +16,10 @@ const getAlignementViaColinearityQuestion = () => {
|
|
|
16
16
|
const isAligned = (0, coinFlip_1.coinFlip)();
|
|
17
17
|
const coeff = new numberNode_1.NumberNode((0, randint_1.randint)(-4, 4, [0, 1]));
|
|
18
18
|
if (isAligned) {
|
|
19
|
-
console.log("1");
|
|
20
19
|
C = AB.times(coeff).getEndPoint(points[0], "C");
|
|
21
20
|
}
|
|
22
21
|
else {
|
|
23
22
|
do {
|
|
24
|
-
console.log(`2 : ${AB.x.toTex()} et ${AB.y.toTex()}`);
|
|
25
23
|
C = point_1.PointConstructor.random("C");
|
|
26
24
|
} while (AB.isColinear(vector_1.VectorConstructor.fromPoints(points[0], C)));
|
|
27
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parallelogramViaEqualVectors.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/parallelogramViaEqualVectors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"parallelogramViaEqualVectors.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/parallelogramViaEqualVectors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAkDF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAa9D,CAAC"}
|
|
@@ -12,7 +12,6 @@ const getParallelogramViaEqualVectorsQuestion = () => {
|
|
|
12
12
|
const AB = vector_1.VectorConstructor.fromPoints(points[0], points[1]);
|
|
13
13
|
let D;
|
|
14
14
|
do {
|
|
15
|
-
console.log(`1 : points: ${points.map((p) => p.toCoords())}, vec : ${AB.x.toTex()} et ${AB.y.toTex()}`);
|
|
16
15
|
D = point_1.PointConstructor.random("D");
|
|
17
16
|
} while (AB.isColinear(vector_1.VectorConstructor.fromPoints(D, points[0])));
|
|
18
17
|
let C;
|
|
@@ -22,7 +21,6 @@ const getParallelogramViaEqualVectorsQuestion = () => {
|
|
|
22
21
|
}
|
|
23
22
|
else {
|
|
24
23
|
do {
|
|
25
|
-
console.log("2");
|
|
26
24
|
C = point_1.PointConstructor.random("C");
|
|
27
25
|
} while (AB.equals(vector_1.VectorConstructor.fromPoints(D, C)));
|
|
28
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findProportion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/findProportion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"findProportion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/findProportion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAsDF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
|
|
@@ -7,7 +7,7 @@ const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
|
7
7
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
8
|
const round_1 = require("../../../math/utils/round");
|
|
9
9
|
const getFindProportionQuestion = () => {
|
|
10
|
-
const total = (0, randint_1.randint)(
|
|
10
|
+
const total = (0, randint_1.randint)(120, 200);
|
|
11
11
|
const lefties = (0, randint_1.randint)(30, 120);
|
|
12
12
|
const answer = (0, round_1.round)((lefties / total) * 100, 2).frenchify() + "\\%";
|
|
13
13
|
const question = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"percentToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/percentToDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"percentToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/percentToDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAuFF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|
|
@@ -42,7 +42,6 @@ const getPropositions = (n, { answer, isPercentToDecimal, nb }) => {
|
|
|
42
42
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
43
43
|
const dec = new decimal_1.Decimal(nb);
|
|
44
44
|
while (propositions.length < n) {
|
|
45
|
-
console.log("percent to decimal qcm");
|
|
46
45
|
if (isPercentToDecimal) {
|
|
47
46
|
(0, exercise_1.tryToAddWrongProp)(propositions, dec
|
|
48
47
|
.multiplyByPowerOfTen((0, randint_1.randint)(-4, 4, [0, 1]))
|
|
@@ -55,7 +55,6 @@ const isAnswerValid = (ans, { int, power }) => {
|
|
|
55
55
|
.toTree({ allowFractionToDecimal: true });
|
|
56
56
|
const secondTree = new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new power_1.Power(int, -power).simplify());
|
|
57
57
|
const texs = [...answerTree.toAllValidTexs(), ...secondTree.toAllValidTexs()];
|
|
58
|
-
console.log(texs);
|
|
59
58
|
return texs.includes(ans);
|
|
60
59
|
};
|
|
61
60
|
exports.calculateNegativePower = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimalToScientific.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/decimalToScientific.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,QAAQ,EAST,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"decimalToScientific.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/decimalToScientific.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,QAAQ,EAST,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAoDF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CA2BrD,CAAC"}
|
|
@@ -45,7 +45,6 @@ const getPropositions = (n, { answer, decimal }) => {
|
|
|
45
45
|
const isAnswerValid = (ans, { decimal }) => {
|
|
46
46
|
const answerTree = new decimal_1.Decimal(decimal).toScientificNotation();
|
|
47
47
|
const texs = answerTree.toAllValidTexs({ forbidPowerToProduct: true });
|
|
48
|
-
console.log(ans, texs);
|
|
49
48
|
return texs.includes(ans);
|
|
50
49
|
};
|
|
51
50
|
exports.decimalToScientific = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powersPower.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersPower.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,EACL,QAAQ,EAST,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"powersPower.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersPower.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,EACL,QAAQ,EAST,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CA6BlD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAiB7C,CAAC"}
|
|
@@ -37,7 +37,6 @@ const getPropositions = (n, { answer, a, b, c }) => {
|
|
|
37
37
|
(0, exercise_1.tryToAddWrongProp)(propositions, "-2");
|
|
38
38
|
}
|
|
39
39
|
while (propositions.length < n) {
|
|
40
|
-
console.log("heeeeeer", a, b, c);
|
|
41
40
|
const wrongExponent = b * c + (0, randint_1.randint)(-11, 11, [0]);
|
|
42
41
|
const wrongAnswerTree = new power_1.Power(a, wrongExponent).simplify();
|
|
43
42
|
const wrongAnswer = wrongAnswerTree.toTex();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scientificToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/scientificToDecimal.ts"],"names":[],"mappings":"AAAA;;MAEM;AAYN,OAAO,EACL,QAAQ,EAST,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"scientificToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/scientificToDecimal.ts"],"names":[],"mappings":"AAAA;;MAEM;AAYN,OAAO,EACL,QAAQ,EAST,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAiDF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CA2BrD,CAAC"}
|