math-exercises 2.1.15 → 2.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/exercise.d.ts +3 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
- package/lib/exercises/math/calcul/proportionality/index.d.ts +1 -0
- package/lib/exercises/math/calcul/proportionality/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/index.js +1 -0
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.d.ts +8 -0
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.d.ts.map +1 -0
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +55 -0
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +4 -0
- 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/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +8 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +1 -1
- 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/logarithm/log10PowerSimplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +12 -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/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.js +2 -0
- package/lib/exercises/math/matrices/matrixGeneralTerm.js +1 -1
- package/lib/exercises/math/percent/index.d.ts +1 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -0
- package/lib/exercises/math/percent/isTableProportional.d.ts +5 -0
- package/lib/exercises/math/percent/isTableProportional.d.ts.map +1 -0
- package/lib/exercises/math/percent/isTableProportional.js +73 -0
- 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.js +1 -1
- 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/python/pyWhileLoop1Exercise.js +1 -1
- 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/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +70 -0
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +12 -0
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +12 -5
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
- package/lib/exercises/pc/forces/forceWork.d.ts.map +1 -1
- package/lib/exercises/pc/pH.d.ts.map +1 -1
- package/lib/exercises/pc/pH.js +7 -0
- package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
- package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -1
- package/lib/exercises/pc/waves/periodicWaveCelerity.js +13 -2
- package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
- package/lib/exercises/pc/weight/weightOnTheMoon.js +17 -0
- package/lib/index.d.ts +74 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.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
|
@@ -12,6 +12,8 @@ export type Proposition = {
|
|
|
12
12
|
};
|
|
13
13
|
export interface Question<TIdentifiers = {}> {
|
|
14
14
|
instruction: string;
|
|
15
|
+
hint?: string;
|
|
16
|
+
correction?: string;
|
|
15
17
|
startStatement?: string;
|
|
16
18
|
answer: string;
|
|
17
19
|
answerFormat: "tex" | "raw";
|
|
@@ -49,7 +51,7 @@ export interface Exercise<TIdentifiers = {}> {
|
|
|
49
51
|
connector?: "=" | "\\iff" | "\\approx";
|
|
50
52
|
generator: (n: number) => Question<TIdentifiers>[];
|
|
51
53
|
maxAllowedQuestions?: number;
|
|
52
|
-
answerType?: "QCM" | "free";
|
|
54
|
+
answerType?: "QCM" | "free" | "QCU";
|
|
53
55
|
qcmTimer: number;
|
|
54
56
|
freeTimer: number;
|
|
55
57
|
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,E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AW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,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",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC"}
|
|
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./proportionalityTable"), exports);
|
|
18
|
+
__exportStar(require("./proportionalityTableCoefficient"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
xValues: number[];
|
|
4
|
+
yValues: number[];
|
|
5
|
+
};
|
|
6
|
+
export declare const proportionalityTableCoefficient: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=proportionalityTableCoefficient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proportionalityTableCoefficient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/proportionalityTableCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAoDF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.proportionalityTableCoefficient = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const integer_1 = require("../../../../math/numbers/integer/integer");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const shuffle_1 = require("../../../../utils/shuffle");
|
|
9
|
+
const getProportionalityTableCoefficient = () => {
|
|
10
|
+
const factor = (0, randint_1.randint)(2, 15);
|
|
11
|
+
const xValues = integer_1.IntegerConstructor.randomDifferents(1, 100 / factor, 3).sort((a, b) => a - b);
|
|
12
|
+
const yValues = xValues.map((x) => x * factor);
|
|
13
|
+
let dataTable = `
|
|
14
|
+
| ${xValues.join(" | ")} |
|
|
15
|
+
|-|-|-|
|
|
16
|
+
| ${yValues.map((n) => n.frenchify()).join(" | ")} |
|
|
17
|
+
`;
|
|
18
|
+
const instruction = `On considère le tableau de proportionnalité suivant : ${dataTable}
|
|
19
|
+
|
|
20
|
+
\n Calculer le coefficient de proportionnalité.`;
|
|
21
|
+
const answer = factor.toTree().toTex();
|
|
22
|
+
const question = {
|
|
23
|
+
instruction,
|
|
24
|
+
answer,
|
|
25
|
+
keys: [],
|
|
26
|
+
answerFormat: "tex",
|
|
27
|
+
identifiers: { xValues, yValues },
|
|
28
|
+
};
|
|
29
|
+
return question;
|
|
30
|
+
};
|
|
31
|
+
const getPropositions = (n, { answer }) => {
|
|
32
|
+
const propositions = [];
|
|
33
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
34
|
+
while (propositions.length < n) {
|
|
35
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (Number(answer) + (0, randint_1.randint)(-3, 3, [0])).toString());
|
|
36
|
+
}
|
|
37
|
+
return (0, shuffle_1.shuffle)(propositions);
|
|
38
|
+
};
|
|
39
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
40
|
+
return ans === answer;
|
|
41
|
+
};
|
|
42
|
+
exports.proportionalityTableCoefficient = {
|
|
43
|
+
id: "proportionalityTableCoefficient",
|
|
44
|
+
connector: "=",
|
|
45
|
+
label: "Calculer un coefficient de proportionnalité à partir d'un tableau",
|
|
46
|
+
levels: ["6ème", "5ème", "4ème", "3ème", "CAP", "2ndPro", "1rePro"],
|
|
47
|
+
isSingleStep: false,
|
|
48
|
+
sections: ["Proportionnalité"],
|
|
49
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getProportionalityTableCoefficient, nb),
|
|
50
|
+
qcmTimer: 60,
|
|
51
|
+
freeTimer: 60,
|
|
52
|
+
getPropositions,
|
|
53
|
+
isAnswerValid,
|
|
54
|
+
subject: "Mathématiques",
|
|
55
|
+
};
|
|
@@ -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,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAalC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2DF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
|
|
@@ -24,6 +24,10 @@ const getEquationType3ExerciseQuestion = () => {
|
|
|
24
24
|
const answer = answerTree.toTex();
|
|
25
25
|
const question = {
|
|
26
26
|
instruction: `Résoudre : $${statementTree.toTex()}$`,
|
|
27
|
+
hint: "Isolez le terme $x$ dans la partie gauche de l'equation.",
|
|
28
|
+
correction: `Commencer par soustraire $${b}$ des deux côtés de l'équation pour
|
|
29
|
+
l'éliminer du côté gauche, ensuite, diviser les deux côtés de l'équation par
|
|
30
|
+
$${a}$ pour isoler $x$, ce qui donne : $ ${a}x = ${c}${b < 0 ? "+" + Math.abs(b) : "-" + Math.abs(b)} \\Leftrightarrow x=\\frac{${c}${b < 0 ? "+" + Math.abs(b) : "-" + Math.abs(b)}}{${a}} \\Leftrightarrow ${answer}$.`,
|
|
27
31
|
startStatement: statementTree.toTex(),
|
|
28
32
|
answer,
|
|
29
33
|
keys: equationKeys_1.equationKeys,
|
|
@@ -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":"equaDiffGeneralForme.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/equaDiff/equaDiffGeneralForme.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"equaDiffGeneralForme.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/equaDiff/equaDiffGeneralForme.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6EF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
|
|
@@ -6,18 +6,25 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
|
|
|
6
6
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
7
|
const expNode_1 = require("../../../tree/nodes/functions/expNode");
|
|
8
8
|
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
|
|
9
10
|
const equalNode_1 = require("../../../tree/nodes/equations/equalNode");
|
|
10
11
|
const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
|
|
11
|
-
const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
|
|
12
12
|
const shuffle_1 = require("../../../utils/shuffle");
|
|
13
|
+
const substractNode_1 = require("../../../tree/nodes/operators/substractNode");
|
|
13
14
|
const getExponentialEquation = () => {
|
|
14
15
|
const a = (0, randint_1.randint)(-19, 20, [0]);
|
|
15
16
|
const equation = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode("y"));
|
|
16
17
|
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"))))).toTex();
|
|
18
|
+
const correctionequation = new equalNode_1.EqualNode(new substractNode_1.SubstractNode(new variableNode_1.VariableNode("y'"), new multiplyNode_1.MultiplyNode(a.toTree(), new variableNode_1.VariableNode("y"))).simplify(), new numberNode_1.NumberNode(0)).toTex();
|
|
19
|
+
const hint = "Rappelez-vous que la solution générale d'une équation différentielle de la forme $y' = ay$ est de la forme $y = Ce^{ax}$, où $C$ est une constante d'intégration.";
|
|
20
|
+
const correction = `La solution est $y = Ce^{ax}$, où $C$ est une constante d'intégration.
|
|
21
|
+
\n Donc, la solution générale de l'équation différentielle $y' = ${a}y$ est $y = Ce^{${a}x}$.`;
|
|
17
22
|
const question = {
|
|
18
23
|
instruction: `Résoudre l'équation différentielle suivante : $y' = ${equation.toTex()}$.`,
|
|
19
24
|
startStatement: `y(x)`,
|
|
20
25
|
answer,
|
|
26
|
+
hint,
|
|
27
|
+
correction,
|
|
21
28
|
keys: ["x", "y", "epower", "exp", "C", "equal"],
|
|
22
29
|
answerFormat: "tex",
|
|
23
30
|
identifiers: { a },
|
|
@@ -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,
|
|
@@ -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"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IntegralDerivatedUCosU = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const cosNode_1 = require("../../../../tree/nodes/functions/cosNode");
|
|
9
|
+
const integralNode_1 = require("../../../../tree/nodes/functions/integralNode");
|
|
10
|
+
const sinNode_1 = require("../../../../tree/nodes/functions/sinNode");
|
|
11
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
12
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
13
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
14
|
+
const getIntegralDerivatedUCosUQuestion = () => {
|
|
15
|
+
const u = affine_1.AffineConstructor.random();
|
|
16
|
+
const cosU = new cosNode_1.CosNode(u.toTree());
|
|
17
|
+
const b = (0, randint_1.randint)(-4, 6);
|
|
18
|
+
const a = (0, randint_1.randint)(-5, b);
|
|
19
|
+
const integral = new integralNode_1.IntegralNode(new multiplyNode_1.MultiplyNode(u.derivate().toTree(), cosU), a.toTree(), b.toTree(), "x");
|
|
20
|
+
const correctAns = getCorrectAnswer(a, b, u);
|
|
21
|
+
const question = {
|
|
22
|
+
answer: correctAns.simplify().toTex(),
|
|
23
|
+
instruction: `Calculer : $${integral.toTex()}$`,
|
|
24
|
+
keys: ["sin", "cos"],
|
|
25
|
+
answerFormat: "tex",
|
|
26
|
+
identifiers: { a, b, aU: u.a, bU: u.b },
|
|
27
|
+
};
|
|
28
|
+
return question;
|
|
29
|
+
};
|
|
30
|
+
const getPropositions = (n, { answer, a, b, aU, bU }) => {
|
|
31
|
+
const propositions = [];
|
|
32
|
+
const u = new affine_1.Affine(aU, bU, "x");
|
|
33
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
34
|
+
generatePropositions(a, b, u).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value));
|
|
35
|
+
let sinA;
|
|
36
|
+
let sinB;
|
|
37
|
+
while (propositions.length < n) {
|
|
38
|
+
sinA = new sinNode_1.SinNode((0, randint_1.randint)(-11, 10, [0]).toTree());
|
|
39
|
+
sinB = new sinNode_1.SinNode((0, randint_1.randint)(-11, 10, [0]).toTree());
|
|
40
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new substractNode_1.SubstractNode(sinB, sinA).toTex());
|
|
41
|
+
}
|
|
42
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
43
|
+
};
|
|
44
|
+
const isAnswerValid = (ans, { a, b, aU, bU }) => {
|
|
45
|
+
const u = new affine_1.Affine(aU, bU, "x");
|
|
46
|
+
const correctAns = getCorrectAnswer(a, b, u).simplify();
|
|
47
|
+
return correctAns.toAllValidTexs().includes(ans);
|
|
48
|
+
};
|
|
49
|
+
const getCorrectAnswer = (a, b, u) => {
|
|
50
|
+
const uTree = u.toTree();
|
|
51
|
+
const primitiveA = new sinNode_1.SinNode(uTree.evaluate({ x: a }).toTree());
|
|
52
|
+
const primitiveB = new sinNode_1.SinNode(uTree.evaluate({ x: b }).toTree());
|
|
53
|
+
return new substractNode_1.SubstractNode(primitiveB, primitiveA);
|
|
54
|
+
};
|
|
55
|
+
const generatePropositions = (a, b, u) => {
|
|
56
|
+
const uTree = u.toTree();
|
|
57
|
+
const uDerivated = u.derivate();
|
|
58
|
+
const sinA = new sinNode_1.SinNode(uTree.evaluate({ x: a }).toTree());
|
|
59
|
+
const sinB = new sinNode_1.SinNode(uTree.evaluate({ x: b }).toTree());
|
|
60
|
+
const firstProposition = new addNode_1.AddNode(sinB, sinA).simplify();
|
|
61
|
+
const secondProposition = new substractNode_1.SubstractNode(sinA, sinB).simplify();
|
|
62
|
+
const thirdProposition = new multiplyNode_1.MultiplyNode(uDerivated.toTree(), new sinNode_1.SinNode(uTree)).simplify();
|
|
63
|
+
return [
|
|
64
|
+
firstProposition.toTex(),
|
|
65
|
+
secondProposition.toTex(),
|
|
66
|
+
thirdProposition.toTex(),
|
|
67
|
+
];
|
|
68
|
+
};
|
|
69
|
+
exports.IntegralDerivatedUCosU = {
|
|
70
|
+
id: "IntegralDerivatedUCosU",
|
|
71
|
+
label: "Calcul d'intégrales de fonctions du type $u'\\cos(u)$",
|
|
72
|
+
levels: ["TermSpé"],
|
|
73
|
+
isSingleStep: true,
|
|
74
|
+
sections: ["Intégration"],
|
|
75
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIntegralDerivatedUCosUQuestion, nb),
|
|
76
|
+
qcmTimer: 60,
|
|
77
|
+
freeTimer: 60,
|
|
78
|
+
getPropositions,
|
|
79
|
+
isAnswerValid,
|
|
80
|
+
subject: "Mathématiques",
|
|
81
|
+
};
|
|
@@ -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 integralDerivatedUSinU: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=integralDerivatedUSinU.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integralDerivatedUSinU.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/integralDerivatedUSinU.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;AAgHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAaxD,CAAC"}
|