math-exercises 3.0.104 → 3.0.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/calcul/arithmetics/getParityBetweenTwoNumbers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/getParityBetweenTwoNumbers.js +3 -4
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.js +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustment.js +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.js +5 -1
- package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.d.ts +1 -0
- package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.js +6 -3
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +2 -1
- package/lib/exercises/math/functions/basics/countFunctionZeroes.js +1 -1
- package/lib/exercises/math/functions/basics/findZeroesProductQuotient.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/findZeroesProductQuotient.js +18 -3
- package/lib/exercises/math/functions/basics/graphicInequation.js +2 -2
- package/lib/exercises/math/functions/basics/graphicInequationAffine.js +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +1 -1
- package/lib/exercises/math/functions/integral/integralKCosinus.js +1 -1
- package/lib/exercises/math/functions/parity/parityFromAlgebra.js +1 -1
- package/lib/exercises/math/functions/sign/affineProductSignTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/affineProductSignTable.js +4 -2
- package/lib/exercises/math/functions/sign/affineProductSignTableThirdLine.js +1 -1
- package/lib/exercises/math/functions/sign/affineSignTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/affineSignTable.js +3 -1
- package/lib/exercises/math/functions/sign/equationFromSignTable.js +2 -2
- package/lib/exercises/math/functions/sign/readSignTable.js +2 -2
- package/lib/exercises/math/functions/variations/compareImagesInVarTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/compareImagesInVarTable.js +8 -7
- package/lib/exercises/math/functions/variations/partialVarTableFromGraph.js +2 -2
- package/lib/exercises/math/functions/variations/readExtremaOnGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/readExtremaOnGraph.js +12 -6
- package/lib/exercises/math/functions/variations/readVarOnGraph.js +8 -8
- package/lib/exercises/math/functions/variations/varTableExtremaReading.js +6 -6
- package/lib/exercises/math/functions/variations/varTableFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/varTableFromGraph.js +2 -7
- package/lib/exercises/math/functions/variations/varTableFromSentences.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/varTableFromSentences.js +3 -1
- package/lib/exercises/math/geometry/optimisation/geometryExtremaReadingOnGraph.js +5 -5
- package/lib/exercises/math/geometry/optimisation/lengthIntervalOnPicture.js +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +3 -2
- package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.js +3 -2
- package/lib/exercises/math/probaStat/basicProbas/ballsBasicProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/ballsBasicProbas.js +2 -2
- package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.js +1 -1
- package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.js +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -2
- package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/index.js +2 -2
- package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts +7 -0
- package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/medianWithList.js +80 -0
- package/lib/exercises/math/probaStat/stats1var/medianWithTable.d.ts +8 -0
- package/lib/exercises/math/probaStat/stats1var/medianWithTable.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/medianWithTable.js +108 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.js +9 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -1
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +2 -2
- package/lib/exercises/pc/dosage/concentrationCalculation.js +3 -3
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +3 -3
- package/lib/exercises/pc/electricity/calculateVoltage.js +1 -1
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +2 -2
- package/lib/exercises/pc/electricity/ohmLaw.js +1 -1
- package/lib/exercises/pc/energy/calorificValue.js +1 -1
- package/lib/exercises/pc/energy/combustionTransferEnergy.js +1 -1
- package/lib/exercises/pc/energy/combustionTransferEnergy2.js +2 -2
- package/lib/exercises/pc/energy/efficiencyCalculation.js +3 -3
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +5 -5
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +1 -1
- package/lib/exercises/pc/forces/gravitationalForcePlanets.js +1 -1
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.js +1 -1
- package/lib/exercises/pc/motion/averageSpeedCalculation.js +4 -4
- package/lib/exercises/pc/orderOfMagnitude.js +1 -1
- package/lib/exercises/pc/power/calculatePowerOfLight.js +1 -1
- package/lib/exercises/pc/spectral/spectralEnergy.js +1 -1
- package/lib/exercises/pc/waves/lightDistanceConversion.js +4 -4
- package/lib/exercises/pc/waves/periodicWaveCelerity.js +3 -3
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/triangles/triangle.d.ts +2 -1
- package/lib/math/geometry/triangles/triangle.d.ts.map +1 -1
- package/lib/math/geometry/triangles/triangle.js +3 -1
- package/lib/math/utils/round.d.ts.map +1 -1
- package/lib/math/utils/round.js +4 -0
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +1 -3
- package/lib/tree/nodes/sets/intervalNode.d.ts +4 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +12 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAsBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAGL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAanD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAsBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAGL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAanD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AA4OF,KAAK,OAAO,GAAG;IACb,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAqEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CA0BvD,CAAC"}
|
|
@@ -142,7 +142,7 @@ ${alignTex([
|
|
|
142
142
|
`;
|
|
143
143
|
};
|
|
144
144
|
const getGGBOptions = (identifiers) => {
|
|
145
|
-
const triangle = TriangleConstructor.fromIdentifiers(identifiers.triangleIdentifiers);
|
|
145
|
+
const triangle = TriangleConstructor.fromIdentifiers(identifiers.triangleIdentifiers, { pointsSize: 3 });
|
|
146
146
|
const subTriangle = getSubTriangle({
|
|
147
147
|
triangle,
|
|
148
148
|
insidePointsNames: identifiers.insidePointsNames,
|
|
@@ -153,7 +153,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
153
153
|
const seg = new Segment(points[0], points[1]);
|
|
154
154
|
const commands = [
|
|
155
155
|
...triangle.commands,
|
|
156
|
-
...points.flatMap((p) => p.toGGBCommand({ color: "#444444", size:
|
|
156
|
+
...points.flatMap((p) => p.toGGBCommand({ color: "#444444", size: 3 })),
|
|
157
157
|
...seg.toGGBCommands(false),
|
|
158
158
|
];
|
|
159
159
|
if (identifiers.isPapillon) {
|
|
@@ -164,6 +164,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
164
164
|
commands,
|
|
165
165
|
hideAxes: true,
|
|
166
166
|
hideGrid: true,
|
|
167
|
+
fontSize: 20,
|
|
167
168
|
});
|
|
168
169
|
let coords = triangle.generateCoords();
|
|
169
170
|
if (identifiers.isPapillon) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findStartValueAfterEvolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/findStartValueAfterEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"findStartValueAfterEvolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/findStartValueAfterEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAiGF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAiB9D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
5
|
import { round } from "../../../../math/utils/round.js";
|
|
5
6
|
import { euroParser } from "../../../../tree/parsers/euroParser.js";
|
|
6
7
|
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
@@ -63,8 +64,8 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
63
64
|
return euroParser(ans) === answer + "€";
|
|
64
65
|
};
|
|
65
66
|
const getFindStartValueAfterEvolutionQuestion = () => {
|
|
66
|
-
const vf =
|
|
67
|
-
const percentRate =
|
|
67
|
+
const vf = randint(5, 100);
|
|
68
|
+
const percentRate = randint(-99, 100, [0]);
|
|
68
69
|
const identifiers = {
|
|
69
70
|
vf,
|
|
70
71
|
percentRate,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ballsBasicProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicProbas/ballsBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;
|
|
1
|
+
{"version":3,"file":"ballsBasicProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicProbas/ballsBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAwGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
|
|
@@ -11,7 +11,7 @@ pluralize;
|
|
|
11
11
|
const getInstruction = (identifiers) => {
|
|
12
12
|
const { repartitions, colorAskedIndex } = identifiers;
|
|
13
13
|
const colorAsked = colors[colorAskedIndex];
|
|
14
|
-
const counts = repartitions.map((count, index) => `$${count}$ ${pluralize("boule", count)} ${colors[index]}`);
|
|
14
|
+
const counts = repartitions.map((count, index) => `$${count}$ ${pluralize("boule", count)} ${pluralize(colors[index], count)}`);
|
|
15
15
|
return `Dans un sac, il y a ${counts[0]}, ${counts[1]} et ${counts[2]}.
|
|
16
16
|
|
|
17
17
|
Quelle est la probabilité de tirer une boule ${colorAsked} ?`;
|
|
@@ -31,7 +31,7 @@ const getCorrection = (identifiers) => {
|
|
|
31
31
|
const { repartitions, colorAskedIndex } = identifiers;
|
|
32
32
|
const nbColorAsked = repartitions[colorAskedIndex];
|
|
33
33
|
const total = repartitions.reduce((acc, curr) => (acc += curr), 0);
|
|
34
|
-
return `Puisque toutes les boules ont la même chance d'être tirée, la probabilité d'obtenir une boule ${colors[colorAskedIndex]} est le nombre de boules ${colors[colorAskedIndex]} divisé par le nombre total de boules, c'est à dire :
|
|
34
|
+
return `Puisque toutes les boules ont la même chance d'être tirée, la probabilité d'obtenir une boule ${colors[colorAskedIndex]} est le nombre de boules ${pluralize(colors[colorAskedIndex], repartitions[colorAskedIndex])} divisé par le nombre total de boules, c'est à dire :
|
|
35
35
|
|
|
36
36
|
$$
|
|
37
37
|
${frac(nbColorAsked, total).toSimplificationTex()}
|
|
@@ -24,7 +24,7 @@ const getInstruction = (identifiers) => {
|
|
|
24
24
|
return `Soit $X$ une variable aléatoire qui suit une loi binomiale de paramètres $n=${nX}$ et $p=${p
|
|
25
25
|
.toTree()
|
|
26
26
|
.simplify()
|
|
27
|
-
.toTex()}$.
|
|
27
|
+
.toTex()}$. Calculer la variance de $X$.`;
|
|
28
28
|
};
|
|
29
29
|
const getHint = (identifiers) => {
|
|
30
30
|
return `L'espérance d'une variable aléatoire $X$ qui suit une loi binomiale de paramètres $n$ et $p$ est donnée par :
|
|
@@ -259,7 +259,7 @@ export const probaFromTableNoContext = {
|
|
|
259
259
|
connector: "=",
|
|
260
260
|
label: "Utiliser un tableau à double entrée pour calculer une probabilité (sans contexte)",
|
|
261
261
|
isSingleStep: true,
|
|
262
|
-
generator: (nb) => getDistinctQuestions(getProbaFromTableNoContextQuestion, nb),
|
|
262
|
+
generator: (nb, opts) => getDistinctQuestions(() => getProbaFromTableNoContextQuestion(opts), nb),
|
|
263
263
|
qcmTimer: 60,
|
|
264
264
|
freeTimer: 60,
|
|
265
265
|
getPropositions,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./averageWithTable.js";
|
|
2
2
|
export * from "./marginalAndConditionalFrequency.js";
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
3
|
+
export * from "./medianWithTable.js";
|
|
4
|
+
export * from "./medianWithList.js";
|
|
5
5
|
export * from "./quartiles.js";
|
|
6
6
|
export * from "./quartilesList.js";
|
|
7
7
|
export * from "./averageList.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./averageWithTable.js";
|
|
2
2
|
export * from "./marginalAndConditionalFrequency.js";
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
3
|
+
export * from "./medianWithTable.js";
|
|
4
|
+
export * from "./medianWithList.js";
|
|
5
5
|
export * from "./quartiles.js";
|
|
6
6
|
export * from "./quartilesList.js";
|
|
7
7
|
export * from "./averageList.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medianWithList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/medianWithList.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAE9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAkFF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
2
|
+
import { median } from "../../../../math/utils/stats/median.js";
|
|
3
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercise.js";
|
|
4
|
+
import { getDistinctQuestions } from "../../../utils/getDistinctQuestions.js";
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { sortedValues } = identifiers;
|
|
7
|
+
return `On considère la liste de valeurs suivante :
|
|
8
|
+
|
|
9
|
+
$$
|
|
10
|
+
${sortedValues.join(";\\ ")}
|
|
11
|
+
$$
|
|
12
|
+
|
|
13
|
+
Déterminer la médiane de cette liste de valeurs.`;
|
|
14
|
+
};
|
|
15
|
+
const getAnswer = (identifiers) => {
|
|
16
|
+
const { sortedValues } = identifiers;
|
|
17
|
+
return median(sortedValues).frenchify();
|
|
18
|
+
};
|
|
19
|
+
const getMedianList = () => {
|
|
20
|
+
let randomValues = [];
|
|
21
|
+
const length = randint(6, 10);
|
|
22
|
+
for (let i = 0; i < length; i++)
|
|
23
|
+
randomValues.push(randint(1, 20));
|
|
24
|
+
const sortedValues = randomValues.sort((a, b) => a - b);
|
|
25
|
+
const identifiers = { sortedValues };
|
|
26
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
27
|
+
};
|
|
28
|
+
const getHint = (identifiers) => {
|
|
29
|
+
return `La médiane est la valeur centrale de la série : il y a autant de valeur inférieures à la médiane que de valeurs supérieures à la médiane.`;
|
|
30
|
+
};
|
|
31
|
+
const getCorrection = (identifiers) => {
|
|
32
|
+
const { sortedValues } = identifiers;
|
|
33
|
+
const total = sortedValues.length;
|
|
34
|
+
const rank = total / 2;
|
|
35
|
+
return `Il y a $${total}$ valeurs dans la liste.
|
|
36
|
+
|
|
37
|
+
Puisque $\\frac{${total}}{2} = ${rank.frenchify()}$, la médiane est ${rank % 1 === 0
|
|
38
|
+
? `entre la $${rank}$ème et la $${rank + 1}$ème valeur.`
|
|
39
|
+
: `la $${Math.ceil(rank)}$ème valeur.`}
|
|
40
|
+
|
|
41
|
+
La médiane est donc $${getAnswer(identifiers)}$.`;
|
|
42
|
+
};
|
|
43
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
44
|
+
const question = {
|
|
45
|
+
instruction: getInstruction(identifiers),
|
|
46
|
+
answer: getAnswer(identifiers),
|
|
47
|
+
keys: [],
|
|
48
|
+
answerFormat: "tex",
|
|
49
|
+
identifiers,
|
|
50
|
+
hint: getHint(identifiers),
|
|
51
|
+
correction: getCorrection(identifiers),
|
|
52
|
+
};
|
|
53
|
+
return question;
|
|
54
|
+
};
|
|
55
|
+
const getPropositions = (n, { answer, sortedValues }) => {
|
|
56
|
+
const propositions = [];
|
|
57
|
+
addValidProp(propositions, answer);
|
|
58
|
+
sortedValues.forEach((value) => tryToAddWrongProp(propositions, value + ""));
|
|
59
|
+
while (propositions.length < n) {
|
|
60
|
+
tryToAddWrongProp(propositions, randint(0, 20) + "");
|
|
61
|
+
}
|
|
62
|
+
return shuffleProps(propositions, n);
|
|
63
|
+
};
|
|
64
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
65
|
+
return ans === answer;
|
|
66
|
+
};
|
|
67
|
+
export const medianWithList = {
|
|
68
|
+
id: "medianWithList",
|
|
69
|
+
connector: "=",
|
|
70
|
+
label: "Calcul de la médiane d'une liste de valeurs",
|
|
71
|
+
isSingleStep: false,
|
|
72
|
+
generator: (nb) => getDistinctQuestions(getMedianList, nb),
|
|
73
|
+
qcmTimer: 60,
|
|
74
|
+
freeTimer: 60,
|
|
75
|
+
getPropositions,
|
|
76
|
+
isAnswerValid,
|
|
77
|
+
subject: "Mathématiques",
|
|
78
|
+
getQuestionFromIdentifiers,
|
|
79
|
+
hasHintAndCorrection: true,
|
|
80
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medianWithTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/medianWithTable.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAaT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAuHF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
2
|
+
import { median } from "../../../../math/utils/stats/median.js";
|
|
3
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
4
|
+
import { dollarize } from "../../../../utils/latex/dollarize.js";
|
|
5
|
+
import { mdTable } from "../../../../utils/markdown/mdTable.js";
|
|
6
|
+
import { addValidProp, tryToAddWrongProp, } from "../../../exercise.js";
|
|
7
|
+
import { getDistinctQuestions } from "../../../utils/getDistinctQuestions.js";
|
|
8
|
+
const getInstruction = ({ randomValues, randomEffectives, }) => {
|
|
9
|
+
return `On considère le tableau d'effectifs suivant :
|
|
10
|
+
|
|
11
|
+
${mdTable([
|
|
12
|
+
["Valeur", ...randomValues.map((e) => dollarize(e))],
|
|
13
|
+
["Effectif", ...randomEffectives.map((e) => dollarize(e))],
|
|
14
|
+
])}
|
|
15
|
+
|
|
16
|
+
Déterminer la médiane de cette série de valeurs.`;
|
|
17
|
+
};
|
|
18
|
+
const getAnswer = (identifiers) => {
|
|
19
|
+
const { randomEffectives, randomValues } = identifiers;
|
|
20
|
+
return median(randomValues, randomEffectives).frenchify();
|
|
21
|
+
};
|
|
22
|
+
const getMedianWithTable = () => {
|
|
23
|
+
const getRandomUniqueValues = (count, min, max) => {
|
|
24
|
+
const uniqueValues = new Set();
|
|
25
|
+
while (uniqueValues.size < count) {
|
|
26
|
+
uniqueValues.add(randint(min, max));
|
|
27
|
+
}
|
|
28
|
+
return Array.from(uniqueValues).sort((a, b) => a - b);
|
|
29
|
+
};
|
|
30
|
+
const randomValues = getRandomUniqueValues(5, 1, 20);
|
|
31
|
+
const randomEffectives = [1, 2, 3, 4, 5].map((el) => randint(1, 6));
|
|
32
|
+
let sortedValues = [];
|
|
33
|
+
for (let i = 0; i < randomEffectives.length; i++)
|
|
34
|
+
for (let j = 0; j < randomEffectives[i]; j++)
|
|
35
|
+
sortedValues.push(randomValues[i]);
|
|
36
|
+
const identifiers = { randomValues, randomEffectives };
|
|
37
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
38
|
+
};
|
|
39
|
+
const getHint = (identifiers) => {
|
|
40
|
+
return `Dresse le tableau des effectifs cumulés croissants. Cela permet de trouver l'effectif total $N$. Puis :
|
|
41
|
+
|
|
42
|
+
- Si $N$ est pair, alors la médiane est la valeur comprise entre la valeur de rang $\\frac{N}{2}$ et celle de rang $\\frac{N}{2}+1$;
|
|
43
|
+
- Si $N$ est impair, alors la médiane est la valeur de rang $\\frac{N+1}{2}$.`;
|
|
44
|
+
};
|
|
45
|
+
const getCorrection = (identifiers) => {
|
|
46
|
+
const { randomEffectives, randomValues } = identifiers;
|
|
47
|
+
const eccs = [];
|
|
48
|
+
let s = 0;
|
|
49
|
+
for (let i = 0; i < randomEffectives.length; i++) {
|
|
50
|
+
s += randomEffectives[i];
|
|
51
|
+
eccs.push(s);
|
|
52
|
+
}
|
|
53
|
+
const total = eccs[eccs.length - 1];
|
|
54
|
+
const rank = total / 2;
|
|
55
|
+
return `On dresse le tableau des effectifs cumulés croissants (ECC) :
|
|
56
|
+
|
|
57
|
+
${mdTable([
|
|
58
|
+
["Valeur", ...randomValues.map((e) => dollarize(e))],
|
|
59
|
+
["Effectif", ...randomEffectives.map((e) => dollarize(e))],
|
|
60
|
+
["ECC", ...eccs.map((e) => dollarize(e))],
|
|
61
|
+
])}
|
|
62
|
+
|
|
63
|
+
L'effectif total est donc $${total}$.
|
|
64
|
+
|
|
65
|
+
Puisque $\\frac{${total}}{2} = ${rank.frenchify()}$, la médiane est ${rank % 1 === 0
|
|
66
|
+
? `entre la $${rank}$ème et la $${rank + 1}$ème valeur.`
|
|
67
|
+
: `la $${Math.ceil(rank)}$ème valeur.`}
|
|
68
|
+
|
|
69
|
+
La médiane est donc $${getAnswer(identifiers)}$.`;
|
|
70
|
+
};
|
|
71
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
72
|
+
const question = {
|
|
73
|
+
instruction: getInstruction(identifiers),
|
|
74
|
+
answer: getAnswer(identifiers),
|
|
75
|
+
keys: [],
|
|
76
|
+
answerFormat: "tex",
|
|
77
|
+
identifiers,
|
|
78
|
+
style: { tableHasNoHeader: true },
|
|
79
|
+
hint: getHint(identifiers),
|
|
80
|
+
correction: getCorrection(identifiers),
|
|
81
|
+
};
|
|
82
|
+
return question;
|
|
83
|
+
};
|
|
84
|
+
const getPropositions = (n, { answer, randomValues }) => {
|
|
85
|
+
const propositions = [];
|
|
86
|
+
addValidProp(propositions, answer);
|
|
87
|
+
while (propositions.length < n) {
|
|
88
|
+
tryToAddWrongProp(propositions, randomValues[randint(0, randomValues.length)] + "");
|
|
89
|
+
}
|
|
90
|
+
return shuffle(propositions);
|
|
91
|
+
};
|
|
92
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
93
|
+
return ans === answer;
|
|
94
|
+
};
|
|
95
|
+
export const medianWithTable = {
|
|
96
|
+
id: "medianWithTable",
|
|
97
|
+
connector: "=",
|
|
98
|
+
label: "Calcul de la médiane d'un tableau d'effectifs",
|
|
99
|
+
isSingleStep: false,
|
|
100
|
+
generator: (nb) => getDistinctQuestions(getMedianWithTable, nb),
|
|
101
|
+
qcmTimer: 60,
|
|
102
|
+
freeTimer: 60,
|
|
103
|
+
getPropositions,
|
|
104
|
+
isAnswerValid,
|
|
105
|
+
subject: "Mathématiques",
|
|
106
|
+
getQuestionFromIdentifiers,
|
|
107
|
+
hasHintAndCorrection: true,
|
|
108
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmeticFindReason.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindReason.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"arithmeticFindReason.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindReason.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAmFF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAiBtD,CAAC"}
|
|
@@ -2,6 +2,8 @@ import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
4
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { round } from "../../../../math/utils/round.js";
|
|
6
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
5
7
|
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
6
8
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
7
9
|
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
@@ -55,9 +57,15 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
55
57
|
};
|
|
56
58
|
return question;
|
|
57
59
|
};
|
|
58
|
-
const getPropositions = (n, { answer }) => {
|
|
60
|
+
const getPropositions = (n, { answer, rank1, reason, value1 }) => {
|
|
59
61
|
const propositions = [];
|
|
60
62
|
addValidProp(propositions, answer);
|
|
63
|
+
const value2 = value1 + reason;
|
|
64
|
+
const nbAns = answer.unfrenchify();
|
|
65
|
+
tryToAddWrongProp(propositions, (-Math.abs(nbAns)).frenchify());
|
|
66
|
+
tryToAddWrongProp(propositions, round(value1 * value2, 2).frenchify());
|
|
67
|
+
value1 !== 0 &&
|
|
68
|
+
tryToAddWrongProp(propositions, frac(value2, value1).simplify().toTex());
|
|
61
69
|
while (propositions.length < n) {
|
|
62
70
|
tryToAddWrongProp(propositions, Number(answer) + randint(-5, 6, [0]) + "");
|
|
63
71
|
}
|
|
@@ -69,7 +69,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
69
69
|
const getHint = (identifiers) => {
|
|
70
70
|
const { elementToFind } = identifiers;
|
|
71
71
|
return elementToFind === "proton"
|
|
72
|
-
? `Pour déterminer le nombre de protons d'un atome,
|
|
72
|
+
? `Pour déterminer le nombre de protons d'un atome, tu peux utiliser l'écriture conventionnelle du noyau atomique.`
|
|
73
73
|
: `On rapelle que : Nombre de neutrons $= A - Z$.`;
|
|
74
74
|
};
|
|
75
75
|
const getCorrection = (identifiers) => {
|
|
@@ -15,7 +15,7 @@ const getInstruction = (identifiers) => {
|
|
|
15
15
|
- Volume total de la solution : $${frenchify(totalVolume)}\\ mL$, \n
|
|
16
16
|
- Masse ${requiresApostropheBefore(elementName) ? "d'" : "de "}${elementName} dans la solution : $${frenchify(elementMass)}\\ g$, \n
|
|
17
17
|
- Volume de ${elementName} dans la solution : $${frenchify(elementVolume)}\\ mL$. \n
|
|
18
|
-
|
|
18
|
+
Calculer la proportion ${targetProportion} ${requiresApostropheBefore(elementName) ? "d'" : "de "}${elementName} dans la solution.`;
|
|
19
19
|
return instruction;
|
|
20
20
|
};
|
|
21
21
|
const getAnswer = (identifiers) => {
|
|
@@ -41,7 +41,7 @@ const getInstruction = (identifiers) => {
|
|
|
41
41
|
const instruction = `Vous êtes en train de réaliser l'étalonnage d'une solution ${requiresApostropheBefore(moleculeName.toLowerCase()) ? "d'" : "de "}${moleculeName.toLowerCase()} en utilisant une solution étalon. Vous avez mesuré les données suivantes :\n
|
|
42
42
|
${knownVariablesText}.\n
|
|
43
43
|
|
|
44
|
-
À partir de ces données,
|
|
44
|
+
À partir de ces données, déterminer ${targetVariableName === "concentration"
|
|
45
45
|
? "la concentration en $\\text{mol} \\cdot \\text{L}^{-1}$"
|
|
46
46
|
: targetVariableName === "molarAbsorptivity"
|
|
47
47
|
? "le coefficient d'absorption molaire en $\\text{L} \\cdot \\text{mol}^{-1} \\cdot \\text{cm}^{-1}$"
|
|
@@ -72,7 +72,7 @@ où :
|
|
|
72
72
|
|
|
73
73
|
- $\\ell$ : la longueur du trajet optique en $\\textrm{cm}$
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
Réorganiser cette formule pour isoler la variable à trouver.`;
|
|
76
76
|
return hint;
|
|
77
77
|
};
|
|
78
78
|
const getCorrection = (identifiers) => {
|
|
@@ -10,15 +10,15 @@ const getInstruction = (identifiers) => {
|
|
|
10
10
|
case "C":
|
|
11
11
|
return `Vous avez une solution contenant une quantité de matière $n = ${frenchify(quantity)}\\ \\textrm{mol}$ dissoute dans un volume $V = ${frenchify(volume)}\\ \\textrm{L}$.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Déterminer la concentration $[X_i]$ en $\\textrm{mol.L}^{-1}$ de cette solution.`;
|
|
14
14
|
case "n":
|
|
15
15
|
return `Vous avez une solution de concentration $[X_i] = ${frenchify(concentration)}\\ \\textrm{mol.L}^{-1}$ dans un volume $V = ${frenchify(volume)}\\ \\textrm{L}$.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Déterminer la quantité de matière $n$ en $\\text{mol}$ de cette solution.`;
|
|
18
18
|
case "V":
|
|
19
19
|
return `Vous avez une solution de concentration $[X_i] = ${frenchify(concentration)}\\ \\textrm{mol.L}^{-1}$ contenant une quantité de matière $n = ${frenchify(quantity)}\\ \\textrm{mol}$.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Déterminer le volume $V$ en $\\textrm{L}$ de cette solution.`;
|
|
22
22
|
break;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
@@ -10,16 +10,16 @@ const getInstruction = (identifiers) => {
|
|
|
10
10
|
case "C":
|
|
11
11
|
return `Vous avez une solution avec une concentration en masse $t = ${frenchify(mass)}\\ \\textrm{g.L}^{-1}$ et une masse molaire $M = ${frenchify(molarMass)}\\ \\textrm{g.mol}^{-1}$.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Déterminer la concentration $C$ en $\\textrm{mol.L}^{-1}$ de cette solution.`;
|
|
14
14
|
case "t":
|
|
15
15
|
return `Vous avez une solution avec une concentration $C = ${frenchify(concentration)}\\ \\textrm{mol.L}^{-1}$ et une masse molaire $M = ${frenchify(molarMass)}\\ \\textrm{g.mol}^{-1}$.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Déterminer la concentration en masse $t$ en $\\textrm{g.L}^{-1}$ de cette solution.`;
|
|
18
18
|
case "M":
|
|
19
19
|
default:
|
|
20
20
|
return `Vous avez une solution avec une concentration en masse $t = ${frenchify(mass)}\\ \\textrm{g.L}^{-1}$ et une concentration $C = ${frenchify(concentration)}\\ \\textrm{mol.L}^{-1}$.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Déterminer la masse molaire $M$ en $\\textrm{g.mol}^{-1}$ de cette solution.`;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
const getAnswer = (identifiers) => {
|
|
@@ -13,7 +13,7 @@ const getInstruction = (identifiers) => {
|
|
|
13
13
|
|
|
14
14
|
- Un courant $I=${I.frenchify()}\\ A$ circule à travers la résistance.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Calculer la tension U aux bornes ${isAsking} en $\\textrm{V}$, arrondie à l'unité.
|
|
17
17
|
|
|
18
18
|
`;
|
|
19
19
|
return instruction;
|
|
@@ -15,7 +15,7 @@ const getInstruction = (identifiers) => {
|
|
|
15
15
|
Calculer l'énergie électrique $E$ en $\\textrm{J}$ fournie par cet appareil.`
|
|
16
16
|
: `Un appareil consomme une énergie $E = ${frenchify(energy)}\\ \\textrm{J}$ en $t = ${frenchify(seconds)}\\ \\textrm{s}$.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Calculer la puissance $P$ en $\\textrm{W}$ de cet appareil.`;
|
|
19
19
|
return questionText;
|
|
20
20
|
};
|
|
21
21
|
const getAnswer = (identifiers) => {
|
|
@@ -32,7 +32,7 @@ $$
|
|
|
32
32
|
E = P \\times t
|
|
33
33
|
$$
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Réarranger cette formule pour isoler la variable à trouver.`;
|
|
36
36
|
return hint;
|
|
37
37
|
};
|
|
38
38
|
const getCorrection = (identifiers) => {
|
|
@@ -22,7 +22,7 @@ const getInstruction = (identifiers) => {
|
|
|
22
22
|
knownVariables[1].name.slice(1)} : $${knownVariables[1].symbol} = ${round(knownVariables[1].value, 2)
|
|
23
23
|
.toTree()
|
|
24
24
|
.toTex()} ${knownVariables[1].unit}$. \n
|
|
25
|
-
|
|
25
|
+
Déterminer ${targetVariable.name === "tension" || targetVariable.name === "résistance"
|
|
26
26
|
? "la"
|
|
27
27
|
: "le"} ${targetVariable.name} ${targetVariable.name === "tension"
|
|
28
28
|
? "aux bords du"
|
|
@@ -11,7 +11,7 @@ const getInstruction = (identifiers) => {
|
|
|
11
11
|
const pcMeasure = new Measure(pc, 0, new DivideUnit(EnergyUnit.kJ, MassUnit.kg));
|
|
12
12
|
const instruction = `Un échantillon d'un combustible $X$ de masse $${massMeasure.toTex({ notScientific: true })}$ est brûlé complètement. Le pouvoir calorifique de ce combustible est $PC = ${pcMeasure.toTex({ notScientific: true })}$.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Calculer l'énergie totale $(Q)$ libérée lors de la combustion de cet échantillon en joules $(J)$.`;
|
|
15
15
|
return instruction;
|
|
16
16
|
};
|
|
17
17
|
const getAnswer = (identifiers) => {
|
|
@@ -10,7 +10,7 @@ const getInstruction = (identifiers) => {
|
|
|
10
10
|
const eCombMeasure = new Measure(eComb, 0, new DivideUnit(EnergyUnit.kJ, AmountOfSubstance.mol));
|
|
11
11
|
const instruction = `Un échantillon d'un combustible $X$ de $${quantity}$ moles est brûlé complètement. L'énergie molaire de combustion de ce combustible est $E_{comb} = ${eCombMeasure.toTex({ notScientific: true })}$.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Calculer l'énergie totale $(Q)$ libérée lors de la combustion de cet échantillon en joules $(J)$.`;
|
|
14
14
|
return instruction;
|
|
15
15
|
};
|
|
16
16
|
const getAnswer = (identifiers) => {
|
|
@@ -13,14 +13,14 @@ const getInstruction = (identifiers) => {
|
|
|
13
13
|
const pcMeasure = new Measure(pc, 0, new DivideUnit(EnergyUnit.kJ, MassUnit.kg));
|
|
14
14
|
const instruction = `Un échantillon d'un combustible $X$ de masse $${massMeasure.toTex({ notScientific: true })}$ est brûlé complètement. Le pouvoir calorifique de ce combustible est $PC = ${pcMeasure.toTex({ notScientific: true })}$.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Calculer l'énergie totale $(Q)$ libérée lors de la combustion de cet échantillon en joules $(J)$.`;
|
|
17
17
|
return instruction;
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
20
20
|
const eCombMeasure = new Measure(eComb, 0, new DivideUnit(EnergyUnit.kJ, AmountOfSubstance.mol));
|
|
21
21
|
return `Un échantillon d'un combustible $X$ de $${quantity}$ moles est brûlé complètement. L'énergie molaire de combustion de ce combustible est $E_{comb} = ${eCombMeasure.toTex({ notScientific: true })}$.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Calculer l'énergie totale $(Q)$ libérée lors de la combustion de cet échantillon en joules $(J)$.`;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
const getAnswer = (identifiers) => {
|
|
@@ -10,17 +10,17 @@ const getInstruction = (identifiers) => {
|
|
|
10
10
|
case "P_in":
|
|
11
11
|
return `Vous êtes dans un laboratoire et vous mesurez l'efficacité d'un convertisseur. La puissance de sortie est $P_{out} = ${frenchify(outputPower)}\\ \\textrm{W}$ et le rendement est $\\eta = ${frenchify(efficiency)}$.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Déterminer la puissance d'entrée $P_{in}$ en $\\textrm{W}$.`;
|
|
14
14
|
break;
|
|
15
15
|
case "P_out":
|
|
16
16
|
return `Vous êtes dans un laboratoire et vous mesurez l'efficacité d'un convertisseur. La puissance d'entrée est $P_{in} = ${frenchify(inputPower)}\\ \\textrm{W}$ et le rendement est $\\eta = ${frenchify(efficiency)}$.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Déterminer la puissance de sortie $P_{out}$ en $\\textrm{W}$.`;
|
|
19
19
|
break;
|
|
20
20
|
case "η":
|
|
21
21
|
return `Vous êtes dans un laboratoire et vous mesurez l'efficacité d'un convertisseur. La puissance d'entrée est $P_{in} = ${frenchify(inputPower)}\\ \\textrm{W}$ et la puissance de sortie est $P_{out} = ${frenchify(outputPower)}\\ \\textrm{W}$.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Déterminer le rendement $\\eta$.`;
|
|
24
24
|
break;
|
|
25
25
|
}
|
|
26
26
|
};
|
|
@@ -13,7 +13,7 @@ const getInstruction = (identifiers) => {
|
|
|
13
13
|
|
|
14
14
|
La température initiale du corps est $\\theta_i = ${frenchify(initialTemp)}\\ \\textrm{K}$ et sa température finale est $\\theta_f = ${frenchify(finalTemp)}\\ \\textrm{K}$.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Déterminer l'énergie thermique $E_{th}$ en $\\textrm{J}$ reçue par le corps.`;
|
|
17
17
|
case "m":
|
|
18
18
|
return `Vous êtes dans un laboratoire et vous chauffez un corps avec une capacité thermique massique $c = ${frenchify(specificHeat)}\\ \\textrm{J}·\\textrm{kg}^{-1}·\\textrm{K}^{-1}$.
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ La température initiale du corps est $\\theta_i = ${frenchify(initialTemp)}\\ \
|
|
|
21
21
|
|
|
22
22
|
L'énergie thermique reçue par le corps est $E_{th} = ${frenchify(round(mass * specificHeat * deltaT, 2))}\\ \\textrm{J}$.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Déterminer la masse $m$ en $\\textrm{kg}$ du corps.`;
|
|
25
25
|
break;
|
|
26
26
|
case "c":
|
|
27
27
|
return `Vous êtes dans un laboratoire et vous chauffez un corps de masse $m = ${frenchify(mass)}\\ \\textrm{kg}$.
|
|
@@ -30,13 +30,13 @@ La température initiale du corps est $\\theta_i = ${frenchify(initialTemp)}\\ \
|
|
|
30
30
|
|
|
31
31
|
L'énergie thermique reçue par le corps est $E_{th} = ${frenchify(round(mass * specificHeat * deltaT, 2))}\\ \\textrm{J}$.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Déterminer la capacité thermique massique $c$ en $\\textrm{J}·\\textrm{kg}^{-1}·\\textrm{K}^{-1}$ du corps.`;
|
|
34
34
|
case "deltaT":
|
|
35
35
|
return `Vous êtes dans un laboratoire et vous chauffez un corps de masse $m = ${frenchify(mass)}\\ \\textrm{kg}$ avec une capacité thermique massique $c = ${frenchify(specificHeat)}\\ \\textrm{J}·\\textrm{kg}^{-1}·\\textrm{K}^{-1}$.
|
|
36
36
|
|
|
37
37
|
L'énergie thermique reçue par le corps est $E_{th} = ${frenchify(round(mass * specificHeat * deltaT, 2))}\\ \\textrm{J}$.
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Déterminer la variation de température $\\Delta\\theta$ en $\\textrm{K}$ du corps.`;
|
|
40
40
|
break;
|
|
41
41
|
}
|
|
42
42
|
};
|
|
@@ -63,7 +63,7 @@ const getHint = (identifiers) => {
|
|
|
63
63
|
$$
|
|
64
64
|
E_{th} = m \\times c \\times (\\theta_f - \\theta_i)
|
|
65
65
|
$$
|
|
66
|
-
|
|
66
|
+
Réarrange cette formule pour isoler la variable à trouver.`;
|
|
67
67
|
return hint;
|
|
68
68
|
};
|
|
69
69
|
const getCorrection = (identifiers) => {
|
|
@@ -50,7 +50,7 @@ où:
|
|
|
50
50
|
- $m_1$ et $m_2$ sont les masses des deux objets
|
|
51
51
|
- $d$ est la distance entre les centres des deux masses.
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Réorganise cette formule pour isoler la hauteur $h$ à partir de la force $F$ mesurée.`;
|
|
54
54
|
return hint;
|
|
55
55
|
};
|
|
56
56
|
const getCorrection = (identifiers) => {
|