math-exercises 2.2.60 → 2.2.62
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 +4 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +1 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.js +8 -1
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +5 -2
- package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts +12 -0
- package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -0
- package/lib/exercises/math/functions/basics/graphicInequationAffine.js +123 -0
- package/lib/exercises/math/functions/basics/index.d.ts +1 -0
- package/lib/exercises/math/functions/basics/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/findSecondRoot.d.ts +10 -0
- package/lib/exercises/math/functions/trinoms/findSecondRoot.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/findSecondRoot.js +127 -0
- package/lib/exercises/math/functions/trinoms/index.d.ts +3 -0
- package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/index.js +3 -0
- package/lib/exercises/math/functions/trinoms/rootsProduct.d.ts +8 -0
- package/lib/exercises/math/functions/trinoms/rootsProduct.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/rootsProduct.js +112 -0
- package/lib/exercises/math/functions/trinoms/rootsSum.d.ts +8 -0
- package/lib/exercises/math/functions/trinoms/rootsSum.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/rootsSum.js +113 -0
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts +4 -1
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.js +17 -5
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +6 -0
- package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersDivision.js +19 -11
- package/lib/exercises/math/powers/powersPower.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersPower.js +19 -11
- package/lib/exercises/math/powers/powersProduct.d.ts +4 -1
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +76 -35
- package/lib/exercises/math/probaStat/binomial/binomialInequation.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/binomialInequation.js +6 -0
- package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +5 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +19 -3
- package/lib/exercises/vea/rationalVEA.d.ts +2 -0
- package/lib/exercises/vea/rationalVEA.d.ts.map +1 -0
- package/lib/exercises/vea/rationalVEA.js +14 -0
- package/lib/index.d.ts +22 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +3 -1
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +1 -7
- package/lib/math/inequations/inequation.d.ts +1 -0
- package/lib/math/inequations/inequation.d.ts.map +1 -1
- package/lib/math/inequations/inequation.js +3 -0
- package/lib/math/numbers/rationals/rational.d.ts +1 -1
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.js +18 -6
- package/lib/math/polynomials/affine.d.ts +1 -0
- package/lib/math/polynomials/affine.d.ts.map +1 -1
- package/lib/math/polynomials/affine.js +4 -0
- package/lib/math/polynomials/generalTrinom.d.ts +10 -2
- package/lib/math/polynomials/generalTrinom.d.ts.map +1 -1
- package/lib/math/polynomials/generalTrinom.js +29 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +4 -6
- package/lib/tree/nodes/operators/fractionNode.d.ts +1 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +10 -0
- package/lib/tree/nodes/operators/powerNode.d.ts +1 -0
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +10 -1
- package/lib/tree/parsers/powerParser.d.ts +2 -0
- package/lib/tree/parsers/powerParser.d.ts.map +1 -0
- package/lib/tree/parsers/powerParser.js +26 -0
- package/lib/tree/parsers/rationalParser.d.ts.map +1 -1
- package/lib/tree/parsers/rationalParser.js +1 -4
- package/lib/tree/parsers/spacePointParser.d.ts.map +1 -1
- package/lib/tree/parsers/spaceVectorParser.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -103,6 +103,10 @@ export type GetStudentGGBOptions<TIdentifiers, TOptions = {}> = (args: TIdentifi
|
|
|
103
103
|
export type RebuildIdentifiers<TIdentifiers, TOptions = {}> = (oldIdentifiers: any, options?: TOptions) => TIdentifiers;
|
|
104
104
|
export type GetQuestionFromIdentifiers<TIdentifiers, TOptions = {}> = (identifiers: TIdentifiers, options?: TOptions) => Question<TIdentifiers>;
|
|
105
105
|
export type QuestionHotFix<TIdentifiers, TOptions = {}> = (q: Question<TIdentifiers>, options?: TOptions) => Question<TIdentifiers>;
|
|
106
|
+
export type ValidateOptions<TOptions = {}> = (options: TOptions) => {
|
|
107
|
+
valid: boolean;
|
|
108
|
+
message: string;
|
|
109
|
+
};
|
|
106
110
|
type PDFOptions = {
|
|
107
111
|
shouldSpreadPropositions?: boolean;
|
|
108
112
|
};
|
|
@@ -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;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,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,oBAAY,qBAAqB;IAC/B,UAAU,eAAe;IACzB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AACD,oBAAY,mBAAmB;IAC7B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,WAAW,gBAAgB;CAC5B;AACD,MAAM,MAAM,eAAe,CAAC,MAAM,GAAG,GAAG,IAAI;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS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,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,8BAA8B,GAC9B,aAAa,GACb,YAAY,GACZ,SAAS,GACT,0BAA0B,GAC1B,WAAW,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,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionsSumsSameDenominators.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSumsSameDenominators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fractionsSumsSameDenominators.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSumsSameDenominators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAgIF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAmB/D,CAAC"}
|
package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js
CHANGED
|
@@ -70,7 +70,7 @@ const getFindCoeffInProportionalTableNonIntegersQuestion = (opts) => {
|
|
|
70
70
|
? (0, randint_1.randint)(2, 10).toTree()
|
|
71
71
|
: coeffType === "Décimal"
|
|
72
72
|
? (0, randfloat_1.randfloat)(1.1, 10, 1).toTree()
|
|
73
|
-
: rational_1.RationalConstructor.randomPureRational().toTree();
|
|
73
|
+
: rational_1.RationalConstructor.randomPureRational(10).toTree();
|
|
74
74
|
const getX = () => {
|
|
75
75
|
return valuesType === "Entières"
|
|
76
76
|
? (0, randint_1.randint)(1, 10).toTree()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTableProportionalNonInteger.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportionalNonInteger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"isTableProportionalNonInteger.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportionalNonInteger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,GAAG,CAAC;IACd,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAqCF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AA8FF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAoBxE,CAAC"}
|
|
@@ -60,7 +60,7 @@ const getIsTableProportionalNonIntegerQuestion = (opts) => {
|
|
|
60
60
|
? (0, randint_1.randint)(2, 10).toTree()
|
|
61
61
|
: coeffType === "Décimal"
|
|
62
62
|
? (0, randfloat_1.randfloat)(1.1, 10, 1).toTree()
|
|
63
|
-
: rational_1.RationalConstructor.randomPureRational().toTree();
|
|
63
|
+
: rational_1.RationalConstructor.randomPureRational(10).toTree();
|
|
64
64
|
const getX = () => {
|
|
65
65
|
return valuesType === "Entières"
|
|
66
66
|
? (0, randint_1.randint)(1, 10).toTree()
|
|
@@ -98,6 +98,13 @@ const getIsTableProportionalNonIntegerQuestion = (opts) => {
|
|
|
98
98
|
};
|
|
99
99
|
return question;
|
|
100
100
|
};
|
|
101
|
+
// const validateOptions : ValidateOptions<Options> = (opts) => {
|
|
102
|
+
// if(!opts.coeffNumberTypes)
|
|
103
|
+
// return {
|
|
104
|
+
// valid: !!opts?.coeffNumberTypes,
|
|
105
|
+
// message: "Veuillez choisir un type de consigne.",
|
|
106
|
+
// };
|
|
107
|
+
// },
|
|
101
108
|
const options = [
|
|
102
109
|
{
|
|
103
110
|
id: "coeffNumberTypes",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicSystemResolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/basicSystemResolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"basicSystemResolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/basicSystemResolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AA8DF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
|
|
@@ -14,16 +14,19 @@ const getBasicSystemResolutionQuestion = () => {
|
|
|
14
14
|
const isXAsked = (0, coinFlip_1.coinFlip)();
|
|
15
15
|
const variable = isXAsked ? "x" : "y";
|
|
16
16
|
const answer = isXAsked ? x.toTex() : y.toTex();
|
|
17
|
+
const identifiers = { coeffs: sys.coeffs, isXAsked };
|
|
17
18
|
const question = {
|
|
18
19
|
answer,
|
|
19
20
|
instruction: `Soit le système d'équations suivant :
|
|
20
21
|
|
|
21
|
-
$$
|
|
22
|
+
$$
|
|
23
|
+
${sys.toTex()}
|
|
24
|
+
$$
|
|
22
25
|
|
|
23
26
|
Que vaut $${variable}$ ?`,
|
|
24
27
|
keys: [],
|
|
25
28
|
answerFormat: "tex",
|
|
26
|
-
identifiers
|
|
29
|
+
identifiers,
|
|
27
30
|
};
|
|
28
31
|
return question;
|
|
29
32
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { InegalitySymbols } from "../../../../math/inequations/inequation";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
yValue: number;
|
|
5
|
+
xValue: number;
|
|
6
|
+
inegalitySymbol: InegalitySymbols;
|
|
7
|
+
a: number;
|
|
8
|
+
b: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const graphicInequationAffine: Exercise<Identifiers>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=graphicInequationAffine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphicInequationAffine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequationAffine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAa3C,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,gBAAgB,CAAC;IAClC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAsHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAiBzD,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.graphicInequationAffine = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
|
|
7
|
+
const inequation_1 = require("../../../../math/inequations/inequation");
|
|
8
|
+
const affine_1 = require("../../../../math/polynomials/affine");
|
|
9
|
+
const randfloat_1 = require("../../../../math/utils/random/randfloat");
|
|
10
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
11
|
+
const infiniteNode_1 = require("../../../../tree/nodes/numbers/infiniteNode");
|
|
12
|
+
const closure_1 = require("../../../../tree/nodes/sets/closure");
|
|
13
|
+
const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
|
|
14
|
+
const coinFlip_1 = require("../../../../utils/alea/coinFlip");
|
|
15
|
+
const random_1 = require("../../../../utils/alea/random");
|
|
16
|
+
const getPropositions = (n, { answer }) => {
|
|
17
|
+
const propositions = [];
|
|
18
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
19
|
+
while (propositions.length < n) {
|
|
20
|
+
const isTowardsLeft = (0, coinFlip_1.coinFlip)();
|
|
21
|
+
const k = (0, randint_1.randint)(-10, 10).toTree();
|
|
22
|
+
const bounds = isTowardsLeft
|
|
23
|
+
? [infiniteNode_1.MinusInfinityNode, k]
|
|
24
|
+
: [k, infiniteNode_1.PlusInfinityNode];
|
|
25
|
+
const closure = closure_1.Closure.fromBrackets(isTowardsLeft ? "]" : "[", (0, random_1.random)(["]", "["]));
|
|
26
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new intervalNode_1.IntervalNode(bounds[0], bounds[1], closure).toTex());
|
|
27
|
+
}
|
|
28
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
29
|
+
};
|
|
30
|
+
const getAnswer = (identifiers) => {
|
|
31
|
+
//ax+b ! y
|
|
32
|
+
const { a, inegalitySymbol, xValue } = identifiers;
|
|
33
|
+
const inequation = new inequation_1.InequationSymbol(inegalitySymbol);
|
|
34
|
+
const isStrict = inequation.isStrict;
|
|
35
|
+
const isAskingSup = inequation.isSup;
|
|
36
|
+
const isCroissante = a > 0;
|
|
37
|
+
const inter = new intervalNode_1.IntervalNode(isCroissante === isAskingSup ? xValue.toTree() : infiniteNode_1.MinusInfinityNode, isCroissante === isAskingSup ? infiniteNode_1.PlusInfinityNode : xValue.toTree(), isStrict
|
|
38
|
+
? closure_1.ClosureType.OO
|
|
39
|
+
: isCroissante === isAskingSup
|
|
40
|
+
? closure_1.ClosureType.FO
|
|
41
|
+
: closure_1.ClosureType.OF);
|
|
42
|
+
return inter.toTex();
|
|
43
|
+
};
|
|
44
|
+
const getInstruction = (identifiers) => {
|
|
45
|
+
const { yValue, inegalitySymbol, a, b } = identifiers;
|
|
46
|
+
const inequation = new inequation_1.InequationSymbol(inegalitySymbol);
|
|
47
|
+
const isStrict = inequation.isStrict;
|
|
48
|
+
const isAskingSup = inequation.isSup;
|
|
49
|
+
return `Ci-dessous est tracé la courbe représentative d'une fonction $f$. Déterminer graphiquement les solutions de l'inéquation $f(x)${isAskingSup ? (isStrict ? ">" : "\\geq") : isStrict ? "<" : "\\leq"}${yValue}$`;
|
|
50
|
+
};
|
|
51
|
+
// const getHint: GetHint<Identifiers> = (identifiers) => {};
|
|
52
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
|
|
53
|
+
const getGGBOptions = (identifiers) => {
|
|
54
|
+
const { a, b } = identifiers;
|
|
55
|
+
const affine = new affine_1.Affine(a, b);
|
|
56
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
57
|
+
commands: affine.toGGBCommands(),
|
|
58
|
+
});
|
|
59
|
+
return ggb.getOptions({
|
|
60
|
+
coords: [-10, 10, -10, 10],
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
const getKeys = (identifiers) => {
|
|
64
|
+
return [
|
|
65
|
+
"S",
|
|
66
|
+
"equal",
|
|
67
|
+
"lbracket",
|
|
68
|
+
"semicolon",
|
|
69
|
+
"rbracket",
|
|
70
|
+
"infty",
|
|
71
|
+
"cup",
|
|
72
|
+
"lbrace",
|
|
73
|
+
"rbrace",
|
|
74
|
+
"varnothing",
|
|
75
|
+
];
|
|
76
|
+
};
|
|
77
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
78
|
+
const inter = answer;
|
|
79
|
+
return ans === inter || ans === "S=" + inter;
|
|
80
|
+
throw Error("VEA not implemented");
|
|
81
|
+
};
|
|
82
|
+
const getGraphicInequationAffineQuestion = (opts) => {
|
|
83
|
+
const yValue = (0, randint_1.randint)(-5, 6);
|
|
84
|
+
const xValue = (0, randint_1.randint)(-5, 6);
|
|
85
|
+
const a = (0, randfloat_1.randfloat)(-3, 4, 1, [0]);
|
|
86
|
+
const b = yValue - a * xValue;
|
|
87
|
+
const inegalitySymbol = inequation_1.InequationSymbolConstructor.randomSymbol();
|
|
88
|
+
const identifiers = {
|
|
89
|
+
a,
|
|
90
|
+
b,
|
|
91
|
+
xValue,
|
|
92
|
+
yValue,
|
|
93
|
+
inegalitySymbol,
|
|
94
|
+
};
|
|
95
|
+
const question = {
|
|
96
|
+
answer: getAnswer(identifiers),
|
|
97
|
+
instruction: getInstruction(identifiers),
|
|
98
|
+
keys: getKeys(identifiers),
|
|
99
|
+
answerFormat: "tex",
|
|
100
|
+
identifiers,
|
|
101
|
+
// hint: getHint(identifiers),
|
|
102
|
+
// correction: getCorrection(identifiers),
|
|
103
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
104
|
+
};
|
|
105
|
+
return question;
|
|
106
|
+
};
|
|
107
|
+
exports.graphicInequationAffine = {
|
|
108
|
+
id: "graphicInequationAffine",
|
|
109
|
+
connector: "=",
|
|
110
|
+
label: "Résoudre graphiquement une inéquation (fonctions affines)",
|
|
111
|
+
isSingleStep: true,
|
|
112
|
+
generator: (nb, opts) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getGraphicInequationAffineQuestion(opts), nb),
|
|
113
|
+
qcmTimer: 60,
|
|
114
|
+
freeTimer: 60,
|
|
115
|
+
getPropositions,
|
|
116
|
+
isAnswerValid,
|
|
117
|
+
subject: "Mathématiques",
|
|
118
|
+
// getHint,
|
|
119
|
+
// getCorrection,
|
|
120
|
+
getInstruction,
|
|
121
|
+
getAnswer,
|
|
122
|
+
getGGBOptions,
|
|
123
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC"}
|
|
@@ -24,3 +24,4 @@ __exportStar(require("./twoFunctionsEquation"), exports);
|
|
|
24
24
|
__exportStar(require("./twoFunctionsInequation"), exports);
|
|
25
25
|
__exportStar(require("./inverseImageFunctionTable"), exports);
|
|
26
26
|
__exportStar(require("./imageAntecedentFromSentence"), exports);
|
|
27
|
+
__exportStar(require("./graphicInequationAffine"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { GeneralTrinomIdentifiers } from "../../../../math/polynomials/generalTrinom";
|
|
3
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor";
|
|
4
|
+
type Identifiers = {
|
|
5
|
+
trinomIdentifiers: GeneralTrinomIdentifiers;
|
|
6
|
+
firstRootIdentifiers: NodeIdentifiers;
|
|
7
|
+
};
|
|
8
|
+
export declare const findSecondRoot: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=findSecondRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findSecondRoot.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/findSecondRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAGL,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAI9C,OAAO,EAEL,eAAe,EAChB,MAAM,kCAAkC,CAAC;AAO1C,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,wBAAwB,CAAC;IAC5C,oBAAoB,EAAE,eAAe,CAAC;CACvC,CAAC;AAiHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAiBhD,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findSecondRoot = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const rationalVEA_1 = require("../../../../exercises/vea/rationalVEA");
|
|
7
|
+
const generalTrinom_1 = require("../../../../math/polynomials/generalTrinom");
|
|
8
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
|
+
const oppositeNode_1 = require("../../../../tree/nodes/functions/oppositeNode");
|
|
10
|
+
const nodeConstructor_1 = require("../../../../tree/nodes/nodeConstructor");
|
|
11
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
12
|
+
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
13
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
14
|
+
const getPropositions = (n, { answer }) => {
|
|
15
|
+
const propositions = [];
|
|
16
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
17
|
+
while (propositions.length < n) {
|
|
18
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(-10, 10).frenchify());
|
|
19
|
+
}
|
|
20
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
21
|
+
};
|
|
22
|
+
const getAnswer = (identifiers) => {
|
|
23
|
+
const { trinomIdentifiers, firstRootIdentifiers } = identifiers;
|
|
24
|
+
const trinom = generalTrinom_1.GeneralTrinomConstructor.fromIdentifiers(trinomIdentifiers);
|
|
25
|
+
const firstRoot = nodeConstructor_1.NodeConstructor.fromIdentifiers(firstRootIdentifiers);
|
|
26
|
+
const firstRootTex = firstRoot.toTex();
|
|
27
|
+
const roots = trinom.getRoots().map((e) => e.toTex());
|
|
28
|
+
return roots.find((r) => r !== firstRootTex);
|
|
29
|
+
};
|
|
30
|
+
const getInstruction = (identifiers) => {
|
|
31
|
+
const { trinomIdentifiers, firstRootIdentifiers } = identifiers;
|
|
32
|
+
const trinom = generalTrinom_1.GeneralTrinomConstructor.fromIdentifiers(trinomIdentifiers);
|
|
33
|
+
const firstRoot = nodeConstructor_1.NodeConstructor.fromIdentifiers(firstRootIdentifiers);
|
|
34
|
+
const firstRootTex = firstRoot.toTex();
|
|
35
|
+
return `Soit $f$ la fonction polynôme du second degré définie sur $\\mathbb{R}$ par :
|
|
36
|
+
|
|
37
|
+
$$
|
|
38
|
+
f(x) = ${trinom.toTree().toTex()}
|
|
39
|
+
$$
|
|
40
|
+
|
|
41
|
+
On admet que $f$ admet deux racines, dont une vaut $${firstRootTex}$.
|
|
42
|
+
|
|
43
|
+
Sans calculer $\\Delta$, déterminer la deuxième racine de $f$.`;
|
|
44
|
+
};
|
|
45
|
+
const getHint = (identifiers) => {
|
|
46
|
+
return `Si $f(x) = ax^2 + bx + c$ admet deux racines $x_1$ et $x_2$, alors leur produit vaut :
|
|
47
|
+
|
|
48
|
+
$$
|
|
49
|
+
x_1\\times x_2 = \\frac{c}{a}
|
|
50
|
+
$$
|
|
51
|
+
|
|
52
|
+
En remplaçant les valeurs par celles données dans l'énoncé, on peut déterminer la deuxième racine de $f$.
|
|
53
|
+
`;
|
|
54
|
+
};
|
|
55
|
+
const getCorrection = (identifiers) => {
|
|
56
|
+
const { trinomIdentifiers, firstRootIdentifiers } = identifiers;
|
|
57
|
+
const trinom = generalTrinom_1.GeneralTrinomConstructor.fromIdentifiers(trinomIdentifiers);
|
|
58
|
+
const firstRoot = nodeConstructor_1.NodeConstructor.fromIdentifiers(firstRootIdentifiers);
|
|
59
|
+
const cOverA = (0, fractionNode_1.frac)(trinom.c, trinom.a).simplify();
|
|
60
|
+
return `On sait que le produit des racines $x_1$ et $x_2$ de $f$ vaut :
|
|
61
|
+
|
|
62
|
+
$$
|
|
63
|
+
x_1\\times x_2 = \\frac{c}{a} = ${cOverA.toTex()}
|
|
64
|
+
$$
|
|
65
|
+
|
|
66
|
+
Or on sait que $x_1 = ${firstRoot.toTex()}$. On a donc :
|
|
67
|
+
|
|
68
|
+
$$
|
|
69
|
+
x_2 = ${(0, fractionNode_1.frac)(cOverA, firstRoot).toSimplificationString()}
|
|
70
|
+
$$
|
|
71
|
+
`;
|
|
72
|
+
};
|
|
73
|
+
const getKeys = (identifiers) => {
|
|
74
|
+
return [];
|
|
75
|
+
};
|
|
76
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
77
|
+
return (0, rationalVEA_1.rationalVEA)(ans, answer);
|
|
78
|
+
};
|
|
79
|
+
const getFindSecondRootQuestion = (ops) => {
|
|
80
|
+
// const firstRoot = coinFlip()
|
|
81
|
+
// ? randint(-10, 10).toTree()
|
|
82
|
+
// : RationalConstructor.randomIrreductibleWithSign(5).toTree();
|
|
83
|
+
const firstRoot = (0, randint_1.randint)(-10, 10);
|
|
84
|
+
// const secondRoot = doWhile(
|
|
85
|
+
// () =>
|
|
86
|
+
// coinFlip()
|
|
87
|
+
// ? randint(-10, 10).toTree()
|
|
88
|
+
// : RationalConstructor.randomIrreductibleWithSign(5).toTree(),
|
|
89
|
+
// (x) => x.equals(firstRoot),
|
|
90
|
+
// );
|
|
91
|
+
const secondRoot = (0, randint_1.randint)(-10, 10, [firstRoot]);
|
|
92
|
+
const a = (0, randint_1.randint)(-10, 10, [0]);
|
|
93
|
+
const b = (0, oppositeNode_1.opposite)((0, multiplyNode_1.multiply)(a, (0, addNode_1.add)(firstRoot, secondRoot))).simplify();
|
|
94
|
+
const c = (0, multiplyNode_1.multiply)(a, (0, multiplyNode_1.multiply)(firstRoot, secondRoot)).simplify();
|
|
95
|
+
//first*second = c/a
|
|
96
|
+
const identifiers = {
|
|
97
|
+
firstRootIdentifiers: firstRoot.toTree().toIdentifiers(),
|
|
98
|
+
trinomIdentifiers: new generalTrinom_1.GeneralTrinom(a, b, c).toIdentifiers(),
|
|
99
|
+
};
|
|
100
|
+
const question = {
|
|
101
|
+
answer: getAnswer(identifiers),
|
|
102
|
+
instruction: getInstruction(identifiers),
|
|
103
|
+
keys: getKeys(identifiers),
|
|
104
|
+
answerFormat: "tex",
|
|
105
|
+
identifiers,
|
|
106
|
+
hint: getHint(identifiers),
|
|
107
|
+
correction: getCorrection(identifiers),
|
|
108
|
+
};
|
|
109
|
+
return question;
|
|
110
|
+
};
|
|
111
|
+
exports.findSecondRoot = {
|
|
112
|
+
id: "findSecondRoot",
|
|
113
|
+
connector: "=",
|
|
114
|
+
label: "Déterminer la deuxième racine d'un trinôme sans utiliser $\\Delta$",
|
|
115
|
+
isSingleStep: true,
|
|
116
|
+
generator: (nb, opts) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getFindSecondRootQuestion(opts), nb),
|
|
117
|
+
qcmTimer: 60,
|
|
118
|
+
freeTimer: 60,
|
|
119
|
+
getPropositions,
|
|
120
|
+
isAnswerValid,
|
|
121
|
+
subject: "Mathématiques",
|
|
122
|
+
getInstruction,
|
|
123
|
+
getHint,
|
|
124
|
+
getCorrection,
|
|
125
|
+
getAnswer,
|
|
126
|
+
hasHintAndCorrection: true,
|
|
127
|
+
};
|
|
@@ -19,4 +19,7 @@ export * from "./solveSecondDegreeEquationByFactorisation";
|
|
|
19
19
|
export * from "./solveSecondDegreeEquationFromCano";
|
|
20
20
|
export * from "./trinomSignFromRoots";
|
|
21
21
|
export * from "./coefficientsIdentification";
|
|
22
|
+
export * from "./rootsSum";
|
|
23
|
+
export * from "./rootsProduct";
|
|
24
|
+
export * from "./findSecondRoot";
|
|
22
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
|
|
@@ -35,3 +35,6 @@ __exportStar(require("./solveSecondDegreeEquationByFactorisation"), exports);
|
|
|
35
35
|
__exportStar(require("./solveSecondDegreeEquationFromCano"), exports);
|
|
36
36
|
__exportStar(require("./trinomSignFromRoots"), exports);
|
|
37
37
|
__exportStar(require("./coefficientsIdentification"), exports);
|
|
38
|
+
__exportStar(require("./rootsSum"), exports);
|
|
39
|
+
__exportStar(require("./rootsProduct"), exports);
|
|
40
|
+
__exportStar(require("./findSecondRoot"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { GeneralTrinomIdentifiers } from "../../../../math/polynomials/generalTrinom";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
trinomIdentifiers: GeneralTrinomIdentifiers;
|
|
5
|
+
};
|
|
6
|
+
export declare const rootsProduct: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=rootsProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rootsProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/rootsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAGL,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAO9C,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,wBAAwB,CAAC;CAC7C,CAAC;AA0GF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAiB9C,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rootsProduct = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const rationalVEA_1 = require("../../../../exercises/vea/rationalVEA");
|
|
7
|
+
const generalTrinom_1 = require("../../../../math/polynomials/generalTrinom");
|
|
8
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
|
+
const oppositeNode_1 = require("../../../../tree/nodes/functions/oppositeNode");
|
|
10
|
+
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
11
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
12
|
+
const getPropositions = (n, { answer, trinomIdentifiers }) => {
|
|
13
|
+
const propositions = [];
|
|
14
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
15
|
+
const trinom = generalTrinom_1.GeneralTrinomConstructor.fromIdentifiers(trinomIdentifiers);
|
|
16
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, fractionNode_1.frac)((0, oppositeNode_1.opposite)(trinom.b), trinom.a).simplify().toTex());
|
|
17
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, fractionNode_1.frac)((0, oppositeNode_1.opposite)(trinom.c), trinom.a).simplify().toTex());
|
|
18
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, fractionNode_1.frac)((0, oppositeNode_1.opposite)(trinom.b), (0, multiplyNode_1.multiply)(2, trinom.a)).simplify().toTex());
|
|
19
|
+
while (propositions.length < n) {
|
|
20
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(-10, 10).frenchify());
|
|
21
|
+
}
|
|
22
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
23
|
+
};
|
|
24
|
+
const getAnswer = (identifiers) => {
|
|
25
|
+
const { trinomIdentifiers } = identifiers;
|
|
26
|
+
const trinom = generalTrinom_1.GeneralTrinomConstructor.fromIdentifiers(trinomIdentifiers);
|
|
27
|
+
const ans = (0, fractionNode_1.frac)(trinom.c, trinom.a).simplify().toTex();
|
|
28
|
+
return ans;
|
|
29
|
+
};
|
|
30
|
+
const getInstruction = (identifiers) => {
|
|
31
|
+
const { trinomIdentifiers } = identifiers;
|
|
32
|
+
const trinom = generalTrinom_1.GeneralTrinomConstructor.fromIdentifiers(trinomIdentifiers);
|
|
33
|
+
return `Soit $f$ la fonction définie sur $\\mathbb{R}$ par :
|
|
34
|
+
|
|
35
|
+
$$
|
|
36
|
+
f(x) = ${trinom.toTree().toTex()}
|
|
37
|
+
$$
|
|
38
|
+
|
|
39
|
+
On admet que $f$ possède deux racines.
|
|
40
|
+
|
|
41
|
+
Que vaut le produit des racines de $f$ ?`;
|
|
42
|
+
};
|
|
43
|
+
const getHint = (identifiers) => {
|
|
44
|
+
return `Si $f(x) = ax^2 + bx + c$ admet deux racines, alors leur produit $P$ vaut :
|
|
45
|
+
|
|
46
|
+
$$
|
|
47
|
+
P = \\frac{c}{a}
|
|
48
|
+
$$`;
|
|
49
|
+
};
|
|
50
|
+
const getCorrection = (identifiers) => {
|
|
51
|
+
const { trinomIdentifiers } = identifiers;
|
|
52
|
+
const trinom = generalTrinom_1.GeneralTrinomConstructor.fromIdentifiers(trinomIdentifiers);
|
|
53
|
+
const aTex = trinom.a.toTex();
|
|
54
|
+
const cTex = trinom.c.toTex();
|
|
55
|
+
const ans = (0, fractionNode_1.frac)(trinom.c, trinom.a);
|
|
56
|
+
return `Si $f(x) = ax^2 + bx + c$ admet deux racines, alors leur produit $P$ vaut :
|
|
57
|
+
|
|
58
|
+
$$
|
|
59
|
+
P = \\frac{c}{a}
|
|
60
|
+
$$
|
|
61
|
+
|
|
62
|
+
Ici, on a $a = ${aTex}$ et $c = ${cTex}$, donc :
|
|
63
|
+
|
|
64
|
+
$$
|
|
65
|
+
P = ${ans.toSimplificationString()}
|
|
66
|
+
$$
|
|
67
|
+
`;
|
|
68
|
+
};
|
|
69
|
+
const getKeys = (identifiers) => {
|
|
70
|
+
return [];
|
|
71
|
+
};
|
|
72
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
73
|
+
return (0, rationalVEA_1.rationalVEA)(ans, answer);
|
|
74
|
+
};
|
|
75
|
+
const getRootsProductQuestion = (ops) => {
|
|
76
|
+
//(b,c) != 0
|
|
77
|
+
//ac <= 0
|
|
78
|
+
const a = (0, randint_1.randint)(-10, 10, [0]);
|
|
79
|
+
const b = (0, randint_1.randint)(-10, 10);
|
|
80
|
+
const c = (a / Math.abs(a)) * (0, randint_1.randint)(-10, 10, !b ? [0] : []);
|
|
81
|
+
const trinom = new generalTrinom_1.GeneralTrinom(a, b, c);
|
|
82
|
+
const identifiers = {
|
|
83
|
+
trinomIdentifiers: trinom.toIdentifiers(),
|
|
84
|
+
};
|
|
85
|
+
const question = {
|
|
86
|
+
answer: getAnswer(identifiers),
|
|
87
|
+
instruction: getInstruction(identifiers),
|
|
88
|
+
keys: getKeys(identifiers),
|
|
89
|
+
answerFormat: "tex",
|
|
90
|
+
identifiers,
|
|
91
|
+
hint: getHint(identifiers),
|
|
92
|
+
correction: getCorrection(identifiers),
|
|
93
|
+
};
|
|
94
|
+
return question;
|
|
95
|
+
};
|
|
96
|
+
exports.rootsProduct = {
|
|
97
|
+
id: "rootsProduct",
|
|
98
|
+
connector: "=",
|
|
99
|
+
label: "Produit des racines d'un trinôme",
|
|
100
|
+
isSingleStep: true,
|
|
101
|
+
generator: (nb, opts) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getRootsProductQuestion(opts), nb),
|
|
102
|
+
qcmTimer: 60,
|
|
103
|
+
freeTimer: 60,
|
|
104
|
+
getPropositions,
|
|
105
|
+
isAnswerValid,
|
|
106
|
+
subject: "Mathématiques",
|
|
107
|
+
getInstruction,
|
|
108
|
+
getHint,
|
|
109
|
+
getCorrection,
|
|
110
|
+
getAnswer,
|
|
111
|
+
hasHintAndCorrection: true,
|
|
112
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { GeneralTrinomIdentifiers } from "../../../../math/polynomials/generalTrinom";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
trinomIdentifiers: GeneralTrinomIdentifiers;
|
|
5
|
+
};
|
|
6
|
+
export declare const rootsSum: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=rootsSum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rootsSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/rootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAGL,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAO9C,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,wBAAwB,CAAC;CAC7C,CAAC;AAqGF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAiB1C,CAAC"}
|