math-exercises 2.1.14 → 2.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/exercise.d.ts +1 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
- package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +1 -1
- package/lib/exercises/math/derivation/derivative/convexityTrinomials.js +1 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustment.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustment.js +16 -16
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +17 -17
- package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.js +12 -12
- package/lib/exercises/math/functions/affines/affineMeanValue.d.ts +9 -0
- package/lib/exercises/math/functions/affines/affineMeanValue.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineMeanValue.js +77 -0
- package/lib/exercises/math/functions/affines/index.d.ts +1 -0
- package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/index.js +1 -0
- package/lib/exercises/math/functions/index.d.ts +1 -0
- package/lib/exercises/math/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/index.js +1 -0
- package/lib/exercises/math/functions/integral/index.d.ts +10 -0
- package/lib/exercises/math/functions/integral/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/index.js +25 -0
- package/lib/exercises/math/functions/integral/integralAffines.d.ts +9 -0
- package/lib/exercises/math/functions/integral/integralAffines.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralAffines.js +72 -0
- package/lib/exercises/math/functions/integral/integralDerivatedUCosU.d.ts +10 -0
- package/lib/exercises/math/functions/integral/integralDerivatedUCosU.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralDerivatedUCosU.js +81 -0
- package/lib/exercises/math/functions/integral/integralDerivatedUSinU.d.ts +10 -0
- package/lib/exercises/math/functions/integral/integralDerivatedUSinU.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralDerivatedUSinU.js +86 -0
- package/lib/exercises/math/functions/integral/integralExpAxPlusB.d.ts +10 -0
- package/lib/exercises/math/functions/integral/integralExpAxPlusB.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralExpAxPlusB.js +83 -0
- package/lib/exercises/math/functions/integral/integralExpU.d.ts +10 -0
- package/lib/exercises/math/functions/integral/integralExpU.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralExpU.js +95 -0
- package/lib/exercises/math/functions/integral/integralFractions.d.ts +10 -0
- package/lib/exercises/math/functions/integral/integralFractions.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralFractions.js +109 -0
- package/lib/exercises/math/functions/integral/integralKCosinus.d.ts +9 -0
- package/lib/exercises/math/functions/integral/integralKCosinus.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralKCosinus.js +83 -0
- package/lib/exercises/math/functions/integral/integralKSinus.d.ts +9 -0
- package/lib/exercises/math/functions/integral/integralKSinus.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralKSinus.js +83 -0
- package/lib/exercises/math/functions/integral/integralTrinomials.d.ts +9 -0
- package/lib/exercises/math/functions/integral/integralTrinomials.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralTrinomials.js +78 -0
- package/lib/exercises/math/functions/parity/parityFromAlgebra.js +1 -1
- package/lib/exercises/math/functions/parity/parityFromGraph.js +1 -1
- package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/index.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/trinomialMeanValue.d.ts +9 -0
- package/lib/exercises/math/functions/trinoms/trinomialMeanValue.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/trinomialMeanValue.js +77 -0
- package/lib/exercises/math/functions/trinoms/variationsFromAlgebricForm.js +1 -1
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +1 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +1 -1
- package/lib/exercises/math/geometry/vectors/colinearity.js +1 -1
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +1 -1
- package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +1 -1
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +1 -1
- package/lib/exercises/math/matrices/matrixGeneralTerm.js +1 -1
- package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.d.ts +13 -0
- package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.js +85 -0
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts +9 -0
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.js +77 -0
- package/lib/exercises/math/probaStat/independancy.js +1 -1
- package/lib/exercises/math/probaStat/index.d.ts +3 -0
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +3 -0
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +20 -9
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts +9 -0
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.js +74 -0
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +1 -1
- package/lib/exercises/math/sequences/genericSequenceVariations.js +1 -1
- package/lib/exercises/math/trigonometry/arcValue.d.ts +9 -0
- package/lib/exercises/math/trigonometry/arcValue.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/arcValue.js +78 -0
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.d.ts +7 -0
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +71 -0
- package/lib/exercises/math/trigonometry/index.d.ts +2 -0
- package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/index.js +2 -0
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
- package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
- package/lib/index.d.ts +70 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValue.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValue.js +1 -0
- package/lib/math/trigonometry/remarkableValues.d.ts +1 -0
- package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValues.js +30 -29
- package/lib/math/utils/combinatorics/combination.d.ts +2 -0
- package/lib/math/utils/combinatorics/combination.d.ts.map +1 -0
- package/lib/math/utils/combinatorics/combination.js +8 -0
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/arcSinNode.d.ts +19 -0
- package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/arcSinNode.js +59 -0
- package/lib/tree/nodes/functions/arccosNode.d.ts +19 -0
- package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/arccosNode.js +60 -0
- package/lib/tree/nodes/functions/arctanNode.d.ts +19 -0
- package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/arctanNode.js +60 -0
- package/lib/tree/nodes/functions/cosNode.d.ts +3 -3
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +14 -15
- package/lib/tree/nodes/functions/expNode.d.ts +1 -1
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/expNode.js +11 -1
- package/lib/tree/nodes/functions/functionNode.d.ts +8 -4
- package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/functionNode.js +8 -4
- package/lib/tree/nodes/functions/integralNode.d.ts +12 -0
- package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/integralNode.js +16 -0
- package/lib/tree/nodes/functions/sinNode.d.ts +2 -2
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sinNode.js +13 -14
- package/lib/tree/nodes/functions/tanNode.d.ts +19 -0
- package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/tanNode.js +64 -0
- package/lib/tree/nodes/geometry/degree.d.ts +20 -0
- package/lib/tree/nodes/geometry/degree.d.ts.map +1 -0
- package/lib/tree/nodes/geometry/degree.js +48 -0
- package/lib/tree/nodes/operators/operatorNode.d.ts +2 -1
- package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/operatorNode.js +1 -0
- package/package.json +1 -1
|
@@ -49,7 +49,7 @@ export interface Exercise<TIdentifiers = {}> {
|
|
|
49
49
|
connector?: "=" | "\\iff" | "\\approx";
|
|
50
50
|
generator: (n: number) => Question<TIdentifiers>[];
|
|
51
51
|
maxAllowedQuestions?: number;
|
|
52
|
-
answerType?: "QCM" | "free";
|
|
52
|
+
answerType?: "QCM" | "free" | "QCU";
|
|
53
53
|
qcmTimer: number;
|
|
54
54
|
freeTimer: number;
|
|
55
55
|
getPropositions?: QCMGenerator<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ,CAAC,YAAY,GAAG,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,QAA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B,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,CAAC"}
|
|
@@ -109,7 +109,7 @@ exports.paritySumsAndProducts = {
|
|
|
109
109
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getParitySumsAndProductsQuestion, nb, 12),
|
|
110
110
|
qcmTimer: 60,
|
|
111
111
|
freeTimer: 60,
|
|
112
|
-
answerType: "
|
|
112
|
+
answerType: "QCU",
|
|
113
113
|
maxAllowedQuestions: 12,
|
|
114
114
|
getPropositions,
|
|
115
115
|
subject: "Mathématiques",
|
|
@@ -69,7 +69,7 @@ exports.binomialsTrinomialsProposedSolutions = {
|
|
|
69
69
|
isSingleStep: true,
|
|
70
70
|
sections: ["Équations"],
|
|
71
71
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getBinomialsTrinomialsProposedSolutionsQuestion, nb),
|
|
72
|
-
answerType: "
|
|
72
|
+
answerType: "QCU",
|
|
73
73
|
qcmTimer: 60,
|
|
74
74
|
freeTimer: 60,
|
|
75
75
|
getPropositions,
|
|
@@ -89,7 +89,7 @@ exports.convexityQuadrinomials = {
|
|
|
89
89
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConvexityQuadrinomialsQuestion, nb),
|
|
90
90
|
qcmTimer: 60,
|
|
91
91
|
freeTimer: 60,
|
|
92
|
-
answerType: "
|
|
92
|
+
answerType: "QCU",
|
|
93
93
|
getPropositions,
|
|
94
94
|
isAnswerValid,
|
|
95
95
|
subject: "Mathématiques",
|
|
@@ -37,7 +37,7 @@ exports.convexityTrinomials = {
|
|
|
37
37
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConvexityTrinomialsQuestion, nb),
|
|
38
38
|
qcmTimer: 60,
|
|
39
39
|
freeTimer: 60,
|
|
40
|
-
answerType: "
|
|
40
|
+
answerType: "QCU",
|
|
41
41
|
getPropositions,
|
|
42
42
|
isAnswerValid,
|
|
43
43
|
subject: "Mathématiques",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affineAdjustment.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineAdjustment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;
|
|
1
|
+
{"version":3,"file":"affineAdjustment.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineAdjustment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAuJF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
|
|
@@ -28,22 +28,22 @@ function generateLinearData(n) {
|
|
|
28
28
|
return data;
|
|
29
29
|
}
|
|
30
30
|
const getAffineAdjustmentQuestion = () => {
|
|
31
|
-
const data = generateLinearData(
|
|
31
|
+
const data = generateLinearData(6);
|
|
32
32
|
data.sort((a, b) => a.x - b.x);
|
|
33
33
|
const xValues = data.map((point) => point.x);
|
|
34
34
|
const yValues = data.map((point) => point.y);
|
|
35
|
-
const G1x = (0, round_1.round)((xValues[0] + xValues[1] + xValues[2]
|
|
36
|
-
const G2x = (0, round_1.round)((xValues[
|
|
37
|
-
const G1y = (0, round_1.round)((yValues[0] + yValues[1] + yValues[2]
|
|
38
|
-
const G2y = (0, round_1.round)((yValues[
|
|
35
|
+
const G1x = (0, round_1.round)((xValues[0] + xValues[1] + xValues[2]) / 3, 1);
|
|
36
|
+
const G2x = (0, round_1.round)((xValues[3] + xValues[4] + xValues[5]) / 3, 1);
|
|
37
|
+
const G1y = (0, round_1.round)((yValues[0] + yValues[1] + yValues[2]) / 3, 1);
|
|
38
|
+
const G2y = (0, round_1.round)((yValues[3] + yValues[4] + yValues[5]) / 3, 1);
|
|
39
39
|
const a = (G2y - G1y) / (G2x - G1x);
|
|
40
|
-
const afixed = (0, round_1.round)(a,
|
|
40
|
+
const afixed = (0, round_1.round)(a, 1);
|
|
41
41
|
const b = G2y - a * G2x;
|
|
42
|
-
const bfixed = (0, round_1.round)(b,
|
|
42
|
+
const bfixed = (0, round_1.round)(b, 1);
|
|
43
43
|
const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(afixed), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true })).toTex();
|
|
44
44
|
let dataTable = `
|
|
45
|
-
| $x$ | ${xValues.join(" | ")} |
|
|
46
|
-
|
|
45
|
+
| $x$ | ${xValues.map((n) => n.frenchify()).join(" | ")} |
|
|
46
|
+
|-|-|-|-|-|-|-|
|
|
47
47
|
| $y$ | ${yValues.map((n) => n.frenchify()).join(" | ")} |
|
|
48
48
|
`;
|
|
49
49
|
const question = {
|
|
@@ -61,15 +61,15 @@ const getPropositions = (n, { answer, G1x, G2x, G1y, G2y }) => {
|
|
|
61
61
|
const propositions = [];
|
|
62
62
|
(0, exercise_1.addValidProp)(propositions, answer, "tex");
|
|
63
63
|
const a = (G2y - G1y) / (G2x - G1x);
|
|
64
|
-
const afixed = (0, round_1.round)(a,
|
|
64
|
+
const afixed = (0, round_1.round)(a, 1);
|
|
65
65
|
const b = G2y - a * G2x;
|
|
66
|
-
const bfixed = (0, round_1.round)(b,
|
|
66
|
+
const bfixed = (0, round_1.round)(b, 1);
|
|
67
67
|
const wrongAnswer1 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new substractNode_1.SubstractNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(afixed), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true }));
|
|
68
68
|
const awrong = (G2x - G1x) / (G2y - G1y);
|
|
69
69
|
const bwrong = G1y - a * G1x;
|
|
70
|
-
const wrongAnswer2 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, round_1.round)(awrong,
|
|
71
|
-
const wrongAnswer3 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(afixed), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode((0, round_1.round)(bwrong,
|
|
72
|
-
const wrongAnswer4 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, round_1.round)(awrong,
|
|
70
|
+
const wrongAnswer2 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, round_1.round)(awrong, 1)), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true }));
|
|
71
|
+
const wrongAnswer3 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(afixed), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode((0, round_1.round)(bwrong, 1))).simplify({ forbidFactorize: true }));
|
|
72
|
+
const wrongAnswer4 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, round_1.round)(awrong, 1)), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode((0, round_1.round)(bwrong, 1))).simplify({ forbidFactorize: true }));
|
|
73
73
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer1.toTex());
|
|
74
74
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer2.toTex());
|
|
75
75
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer3.toTex());
|
|
@@ -84,9 +84,9 @@ const getPropositions = (n, { answer, G1x, G2x, G1y, G2y }) => {
|
|
|
84
84
|
};
|
|
85
85
|
const isAnswerValid = (ans, { G1x, G2x, G1y, G2y }) => {
|
|
86
86
|
const a = (G2y - G1y) / (G2x - G1x);
|
|
87
|
-
const afixed = (0, round_1.round)(a,
|
|
87
|
+
const afixed = (0, round_1.round)(a, 1);
|
|
88
88
|
const b = G2y - a * G2x;
|
|
89
|
-
const bfixed = (0, round_1.round)(b,
|
|
89
|
+
const bfixed = (0, round_1.round)(b, 1);
|
|
90
90
|
const valid = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(afixed), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true }));
|
|
91
91
|
const latexs = valid.toAllValidTexs({ allowRawRightChildAsSolution: true });
|
|
92
92
|
return latexs.includes(ans);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affineAdjustmentComplete.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineAdjustmentComplete.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"affineAdjustmentComplete.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineAdjustmentComplete.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAqLF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAelE,CAAC"}
|
|
@@ -40,27 +40,27 @@ function calculateRSquared(xValues, yValues) {
|
|
|
40
40
|
const denominator = Math.sqrt((n * sumX2 - sumX * sumX) * (n * sumY2 - sumY * sumY));
|
|
41
41
|
const r = numerator / denominator;
|
|
42
42
|
const rSquared = r * r;
|
|
43
|
-
return rSquared;
|
|
43
|
+
return (0, round_1.round)(rSquared, 2);
|
|
44
44
|
}
|
|
45
45
|
const getAffineAdjustmentCompleteQuestion = () => {
|
|
46
|
-
const data = generateLinearData(
|
|
46
|
+
const data = generateLinearData(6);
|
|
47
47
|
data.sort((a, b) => a.x - b.x);
|
|
48
48
|
const xValues = data.map((point) => point.x);
|
|
49
49
|
const yValues = data.map((point) => point.y);
|
|
50
|
-
const G1x = (0, round_1.round)((xValues[0] + xValues[1] + xValues[2]
|
|
51
|
-
const G2x = (0, round_1.round)((xValues[
|
|
52
|
-
const G1y = (0, round_1.round)((yValues[0] + yValues[1] + yValues[2]
|
|
53
|
-
const G2y = (0, round_1.round)((yValues[
|
|
50
|
+
const G1x = (0, round_1.round)((xValues[0] + xValues[1] + xValues[2]) / 3, 1);
|
|
51
|
+
const G2x = (0, round_1.round)((xValues[3] + xValues[4] + xValues[5]) / 3, 1);
|
|
52
|
+
const G1y = (0, round_1.round)((yValues[0] + yValues[1] + yValues[2]) / 3, 1);
|
|
53
|
+
const G2y = (0, round_1.round)((yValues[3] + yValues[4] + yValues[5]) / 3, 1);
|
|
54
54
|
const rSquared = calculateRSquared(xValues, yValues);
|
|
55
55
|
const a = (G2y - G1y) / (G2x - G1x);
|
|
56
|
-
const afixed = (0, round_1.round)(a,
|
|
56
|
+
const afixed = (0, round_1.round)(a, 1);
|
|
57
57
|
const b = G2y - a * G2x;
|
|
58
|
-
const bfixed = (0, round_1.round)(b,
|
|
58
|
+
const bfixed = (0, round_1.round)(b, 1);
|
|
59
59
|
const answerEq = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(afixed), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true })).toTex();
|
|
60
|
-
const answerR = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)),
|
|
60
|
+
const answerR = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), rSquared.toTree()).toTex();
|
|
61
61
|
let dataTable = `
|
|
62
62
|
| $x$ | ${xValues.join(" | ")} |
|
|
63
|
-
|
|
63
|
+
|-|-|-|-|-|-|-|
|
|
64
64
|
| $y$ | ${yValues.map((n) => n.frenchify()).join(" | ")} |
|
|
65
65
|
`;
|
|
66
66
|
const question = {
|
|
@@ -78,16 +78,16 @@ const getPropositions = (n, { answer, G1x, G2x, G1y, G2y, rSquared }) => {
|
|
|
78
78
|
const propositions = [];
|
|
79
79
|
(0, exercise_1.addValidProp)(propositions, answer, "tex");
|
|
80
80
|
const a = (G2y - G1y) / (G2x - G1x);
|
|
81
|
-
const afixed = (0, round_1.round)(a,
|
|
81
|
+
const afixed = (0, round_1.round)(a, 1);
|
|
82
82
|
const b = G2y - a * G2x;
|
|
83
|
-
const bfixed = (0, round_1.round)(b,
|
|
83
|
+
const bfixed = (0, round_1.round)(b, 1);
|
|
84
84
|
const answerEq = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(afixed), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true })).toTex();
|
|
85
|
-
const answerR = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)),
|
|
85
|
+
const answerR = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), rSquared.toTree()).toTex();
|
|
86
86
|
const wrongAnswerEq1 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new substractNode_1.SubstractNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(afixed), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true })).toTex();
|
|
87
87
|
const awrong = (G2x - G1x) / (G2y - G1y);
|
|
88
|
-
const wrongAnswerEq2 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, round_1.round)(awrong,
|
|
89
|
-
const wrongAnswerR1 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("R"),
|
|
90
|
-
const wrongAnswerR2 = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), (
|
|
88
|
+
const wrongAnswerEq2 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, round_1.round)(awrong, 1)), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true })).toTex();
|
|
89
|
+
const wrongAnswerR1 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("R"), rSquared.toTree()).toTex();
|
|
90
|
+
const wrongAnswerR2 = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), (rSquared + 0.01).toTree()).toTex();
|
|
91
91
|
const wrongAnswer1 = `${answerEq}\\newline ${wrongAnswerR1}`;
|
|
92
92
|
const wrongAnswer2 = `${answerEq}\\newline ${wrongAnswerR2}`;
|
|
93
93
|
const wrongAnswer3 = `${wrongAnswerEq1}\\newline ${answerR}`;
|
|
@@ -116,7 +116,7 @@ exports.affineAdjustmentCompleteExercise = {
|
|
|
116
116
|
isSingleStep: true,
|
|
117
117
|
sections: ["Statistiques"],
|
|
118
118
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAffineAdjustmentCompleteQuestion, nb),
|
|
119
|
-
answerType: "
|
|
119
|
+
answerType: "QCU",
|
|
120
120
|
qcmTimer: 60,
|
|
121
121
|
freeTimer: 60,
|
|
122
122
|
getPropositions,
|
|
@@ -37,18 +37,18 @@ function calculateRSquared(xValues, yValues) {
|
|
|
37
37
|
const denominator = Math.sqrt((n * sumX2 - sumX * sumX) * (n * sumY2 - sumY * sumY));
|
|
38
38
|
const r = numerator / denominator;
|
|
39
39
|
const rSquared = r * r;
|
|
40
|
-
return rSquared;
|
|
40
|
+
return (0, round_1.round)(rSquared, 2);
|
|
41
41
|
}
|
|
42
42
|
const getAffineAdjustmentRsquaredQuestion = () => {
|
|
43
|
-
const data = generateLinearData(
|
|
43
|
+
const data = generateLinearData(6);
|
|
44
44
|
data.sort((a, b) => a.x - b.x);
|
|
45
|
-
const xValues = data.map((point) => (0, round_1.round)(point.x,
|
|
46
|
-
const yValues = data.map((point) => (0, round_1.round)(point.y,
|
|
45
|
+
const xValues = data.map((point) => (0, round_1.round)(point.x, 1));
|
|
46
|
+
const yValues = data.map((point) => (0, round_1.round)(point.y, 1));
|
|
47
47
|
const rSquared = calculateRSquared(xValues, yValues);
|
|
48
|
-
const answer = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)),
|
|
48
|
+
const answer = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), rSquared.toTree()).toTex();
|
|
49
49
|
let dataTable = `
|
|
50
50
|
| $x$ | ${xValues.join(" | ")} |
|
|
51
|
-
|
|
51
|
+
|-|-|-|-|-|-|-|
|
|
52
52
|
| $y$ | ${yValues.map((n) => n.frenchify()).join(" | ")} |
|
|
53
53
|
`;
|
|
54
54
|
const question = {
|
|
@@ -65,21 +65,21 @@ const getAffineAdjustmentRsquaredQuestion = () => {
|
|
|
65
65
|
const getPropositions = (n, { answer, rSquared }) => {
|
|
66
66
|
const propositions = [];
|
|
67
67
|
(0, exercise_1.addValidProp)(propositions, answer, "tex");
|
|
68
|
-
const wrongAnswer1 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("R"),
|
|
69
|
-
const wrongAnswer2 = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), (
|
|
70
|
-
const wrongAnswer3 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("R"), (-
|
|
68
|
+
const wrongAnswer1 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("R"), rSquared.toTree()).toTex();
|
|
69
|
+
const wrongAnswer2 = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), (rSquared + 0.01).toTree()).toTex();
|
|
70
|
+
const wrongAnswer3 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("R"), (rSquared - 0.01).toTree()).toTex();
|
|
71
71
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer1);
|
|
72
72
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer2);
|
|
73
73
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer3);
|
|
74
74
|
while (propositions.length < n) {
|
|
75
|
-
const wrongAnswer = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(
|
|
75
|
+
const wrongAnswer = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(1)), (0, round_1.round)(Math.random(), 2).toTree()).toTex();
|
|
76
76
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
|
|
77
77
|
}
|
|
78
78
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
79
79
|
};
|
|
80
80
|
const isAnswerValid = (ans, { rSquared }) => {
|
|
81
|
-
const
|
|
82
|
-
const latexs =
|
|
81
|
+
const validanswer = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), rSquared.toTree());
|
|
82
|
+
const latexs = validanswer.toAllValidTexs({
|
|
83
83
|
allowRawRightChildAsSolution: true,
|
|
84
84
|
allowFractionToDecimal: true,
|
|
85
85
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
trinomial: number[];
|
|
4
|
+
leftbound: number;
|
|
5
|
+
rightbound: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const affineMeanValue: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=affineMeanValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affineMeanValue.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineMeanValue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAqGF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.affineMeanValue = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const trinom_1 = require("../../../../math/polynomials/trinom");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
|
+
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
11
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
12
|
+
const closure_1 = require("../../../../tree/nodes/sets/closure");
|
|
13
|
+
const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
|
|
14
|
+
const getAffineMeanValueQuestion = () => {
|
|
15
|
+
const a = (0, randint_1.randint)(-10, 10, [0]);
|
|
16
|
+
const b = (0, randint_1.randint)(-10, 10);
|
|
17
|
+
const trinomial = new trinom_1.Trinom(a, b, (0, randint_1.randint)(-10, 10));
|
|
18
|
+
const leftbound = (0, randint_1.randint)(-5, 6);
|
|
19
|
+
const rightbound = (0, randint_1.randint)(leftbound + 1, leftbound + 1);
|
|
20
|
+
const func = trinomial.derivate().toTree().toTex();
|
|
21
|
+
const interval = new intervalNode_1.IntervalNode(leftbound.toTree(), rightbound.toTree(), closure_1.ClosureType.FF).toTex();
|
|
22
|
+
const answer = new multiplyNode_1.MultiplyNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), (rightbound - leftbound).toTree()), (trinomial.calculate(rightbound) - trinomial.calculate(leftbound)).toTree())
|
|
23
|
+
.simplify()
|
|
24
|
+
.toTex();
|
|
25
|
+
const question = {
|
|
26
|
+
answer: answer,
|
|
27
|
+
instruction: `Soit $f(x) = ${func}$. Quelle est la valeur moyenne de $f$ sur $${interval}$ ?`,
|
|
28
|
+
keys: [],
|
|
29
|
+
answerFormat: "tex",
|
|
30
|
+
identifiers: {
|
|
31
|
+
trinomial: [trinomial.a, trinomial.b, trinomial.c],
|
|
32
|
+
rightbound,
|
|
33
|
+
leftbound,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
return question;
|
|
37
|
+
};
|
|
38
|
+
const getPropositions = (n, { answer, trinomial, leftbound, rightbound }) => {
|
|
39
|
+
const propositions = [];
|
|
40
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
41
|
+
const trinomial1 = new trinom_1.Trinom(trinomial[0], trinomial[1], trinomial[2]);
|
|
42
|
+
const wrongAnswer1 = new addNode_1.AddNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), (rightbound - leftbound).toTree()).simplify(), (trinomial1.calculate(rightbound) - trinomial1.calculate(leftbound)).toTree())
|
|
43
|
+
.simplify({ forbidFactorize: true })
|
|
44
|
+
.toTex();
|
|
45
|
+
const wrongAnswer2 = new multiplyNode_1.MultiplyNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), (leftbound - rightbound).toTree()), (trinomial1.calculate(rightbound) - trinomial1.calculate(leftbound)).toTree())
|
|
46
|
+
.simplify()
|
|
47
|
+
.toTex();
|
|
48
|
+
const wrongAnswer3 = (trinomial1.calculate(rightbound) - trinomial1.calculate(leftbound))
|
|
49
|
+
.toTree()
|
|
50
|
+
.toTex();
|
|
51
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer1);
|
|
52
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer2);
|
|
53
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer3);
|
|
54
|
+
while (propositions.length < n) {
|
|
55
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(-10, 10).toTree().toTex());
|
|
56
|
+
}
|
|
57
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
58
|
+
};
|
|
59
|
+
const isAnswerValid = (ans, { answer, trinomial, leftbound, rightbound }) => {
|
|
60
|
+
const trinomial1 = new trinom_1.Trinom(trinomial[0], trinomial[1], trinomial[2]);
|
|
61
|
+
const validanswer = new multiplyNode_1.MultiplyNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), (rightbound - leftbound).toTree()), (trinomial1.calculate(rightbound) - trinomial1.calculate(leftbound)).toTree()).simplify();
|
|
62
|
+
const latexs = validanswer.toAllValidTexs();
|
|
63
|
+
return latexs.includes(ans);
|
|
64
|
+
};
|
|
65
|
+
exports.affineMeanValue = {
|
|
66
|
+
id: "affineMeanValue",
|
|
67
|
+
label: "Calcul de la valeur moyenne d'une fonction affine",
|
|
68
|
+
levels: ["TermSpé"],
|
|
69
|
+
isSingleStep: true,
|
|
70
|
+
sections: ["Intégration"],
|
|
71
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAffineMeanValueQuestion, nb),
|
|
72
|
+
qcmTimer: 60,
|
|
73
|
+
freeTimer: 60,
|
|
74
|
+
getPropositions,
|
|
75
|
+
isAnswerValid,
|
|
76
|
+
subject: "Mathématiques",
|
|
77
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
|
|
@@ -25,3 +25,4 @@ __exportStar(require("./leadingCoeffAndOriginOrdinate"), exports);
|
|
|
25
25
|
__exportStar(require("./affineAdjustment"), exports);
|
|
26
26
|
__exportStar(require("./affineAdjustmentRsquared"), exports);
|
|
27
27
|
__exportStar(require("./affineAdjustmentComplete"), exports);
|
|
28
|
+
__exportStar(require("./affineMeanValue"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./integralAffines";
|
|
2
|
+
export * from "./integralTrinomials";
|
|
3
|
+
export * from "./integralKCosinus";
|
|
4
|
+
export * from "./integralKSinus";
|
|
5
|
+
export * from "./integralFractions";
|
|
6
|
+
export * from "./integralExpU";
|
|
7
|
+
export * from "./integralExpAxPlusB";
|
|
8
|
+
export * from "./integralDerivatedUSinU";
|
|
9
|
+
export * from "./integralDerivatedUCosU";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./integralAffines"), exports);
|
|
18
|
+
__exportStar(require("./integralTrinomials"), exports);
|
|
19
|
+
__exportStar(require("./integralKCosinus"), exports);
|
|
20
|
+
__exportStar(require("./integralKSinus"), exports);
|
|
21
|
+
__exportStar(require("./integralFractions"), exports);
|
|
22
|
+
__exportStar(require("./integralExpU"), exports);
|
|
23
|
+
__exportStar(require("./integralExpAxPlusB"), exports);
|
|
24
|
+
__exportStar(require("./integralDerivatedUSinU"), exports);
|
|
25
|
+
__exportStar(require("./integralDerivatedUCosU"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
lowerBound: number;
|
|
4
|
+
upperBound: number;
|
|
5
|
+
trinomial: number[];
|
|
6
|
+
};
|
|
7
|
+
export declare const integralAffines: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=integralAffines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integralAffines.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/integralAffines.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAiFF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.integralAffines = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const trinom_1 = require("../../../../math/polynomials/trinom");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const integralNode_1 = require("../../../../tree/nodes/functions/integralNode");
|
|
9
|
+
const getIntegralAffinesQuestion = () => {
|
|
10
|
+
const trinomial = trinom_1.TrinomConstructor.random();
|
|
11
|
+
const affine = trinomial.derivate();
|
|
12
|
+
let lowerBound = (0, randint_1.randint)(-5, 5);
|
|
13
|
+
let upperBound = (0, randint_1.randint)(-5, 5);
|
|
14
|
+
while (lowerBound >= upperBound) {
|
|
15
|
+
lowerBound = (0, randint_1.randint)(-5, 5);
|
|
16
|
+
upperBound = (0, randint_1.randint)(-5, 5);
|
|
17
|
+
}
|
|
18
|
+
const integral = new integralNode_1.IntegralNode(affine.toTree(), lowerBound.toTree(), upperBound.toTree(), "x").toTex();
|
|
19
|
+
const answer = (trinomial.calculate(upperBound) - trinomial.calculate(lowerBound))
|
|
20
|
+
.toTree()
|
|
21
|
+
.toTex();
|
|
22
|
+
const question = {
|
|
23
|
+
answer: answer,
|
|
24
|
+
instruction: `Calculer : $${integral}$`,
|
|
25
|
+
keys: [],
|
|
26
|
+
answerFormat: "tex",
|
|
27
|
+
identifiers: {
|
|
28
|
+
lowerBound,
|
|
29
|
+
upperBound,
|
|
30
|
+
trinomial: [trinomial.a, trinomial.b, trinomial.c],
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
return question;
|
|
34
|
+
};
|
|
35
|
+
const getPropositions = (n, { answer, lowerBound, upperBound, trinomial }) => {
|
|
36
|
+
const propositions = [];
|
|
37
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
38
|
+
const trinomial1 = new trinom_1.Trinom(trinomial[0], trinomial[1], trinomial[2]);
|
|
39
|
+
const affine = trinomial1.derivate();
|
|
40
|
+
const wrongAnswer1 = (trinomial1.calculate(lowerBound) - trinomial1.calculate(upperBound))
|
|
41
|
+
.toTree()
|
|
42
|
+
.toTex();
|
|
43
|
+
const wrongAnswer2 = (affine.calculate(upperBound) - affine.calculate(lowerBound))
|
|
44
|
+
.toTree()
|
|
45
|
+
.toTex();
|
|
46
|
+
const wrongAnswer3 = (affine.calculate(lowerBound) - affine.calculate(upperBound))
|
|
47
|
+
.toTree()
|
|
48
|
+
.toTex();
|
|
49
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer1);
|
|
50
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer2);
|
|
51
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer3);
|
|
52
|
+
while (propositions.length < n) {
|
|
53
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(-10, 10).toTree().toTex());
|
|
54
|
+
}
|
|
55
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
56
|
+
};
|
|
57
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
58
|
+
return ans === answer;
|
|
59
|
+
};
|
|
60
|
+
exports.integralAffines = {
|
|
61
|
+
id: "integralAffines",
|
|
62
|
+
label: "Calcul d'intégrales de fonctions affines",
|
|
63
|
+
levels: ["TermSpé"],
|
|
64
|
+
isSingleStep: true,
|
|
65
|
+
sections: ["Intégration"],
|
|
66
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIntegralAffinesQuestion, nb),
|
|
67
|
+
qcmTimer: 60,
|
|
68
|
+
freeTimer: 60,
|
|
69
|
+
getPropositions,
|
|
70
|
+
isAnswerValid,
|
|
71
|
+
subject: "Mathématiques",
|
|
72
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
aU: number;
|
|
6
|
+
bU: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const IntegralDerivatedUCosU: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=integralDerivatedUCosU.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integralDerivatedUCosU.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/integralDerivatedUCosU.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,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAmFF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAaxD,CAAC"}
|