math-exercises 3.0.105 → 3.0.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/exercise.d.ts +1 -6
- package/lib/exercises/exercise.d.ts.map +1 -1
- 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/calcul/ordering/decimalOrderingNoRelatives.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +0 -2
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +0 -2
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +0 -2
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistri.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistri.js +0 -2
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistri.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistri.js +0 -2
- package/lib/exercises/math/calculLitteral/equation/equa1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa1.js +0 -2
- package/lib/exercises/math/calculLitteral/equation/equa2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa2.js +0 -2
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +0 -2
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +0 -2
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +0 -2
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +0 -2
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +0 -2
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +0 -2
- package/lib/exercises/math/derivation/derivative/productDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/productDerivative.js +0 -2
- 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/convexity/convexityTrinomialsGeo.d.ts.map +1 -1
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +0 -2
- package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.js +0 -2
- 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/geometry/triangles/traceMedianInTriangle.js +0 -2
- package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfCube.js +0 -2
- package/lib/exercises/math/limits/polynomLimitNoFI.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimitNoFI.js +0 -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/percent/htToTTC.d.ts.map +1 -1
- package/lib/exercises/math/percent/htToTTC.js +0 -2
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +0 -2
- package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -1
- package/lib/exercises/math/percent/ttcToHT.js +0 -2
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +0 -2
- package/lib/exercises/math/primitive/exponentialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/exponentialPrimitive.js +0 -2
- package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.js +1 -3
- package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageList.js +0 -2
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +0 -2
- 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/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.js +0 -2
- package/lib/exercises/math/sets/setBelonging.d.ts.map +1 -1
- package/lib/exercises/math/sets/setBelonging.js +0 -2
- package/lib/exercises/math/trigonometry/arcValue.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/arcValue.js +0 -2
- package/lib/exercises/math/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/remarkableValues.js +0 -2
- 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 -3
- package/lib/exercises/pc/math/isolateVariables.d.ts.map +1 -1
- package/lib/exercises/pc/math/isolateVariables.js +0 -1
- package/lib/exercises/pc/mole/concentrationReading.d.ts.map +1 -1
- package/lib/exercises/pc/mole/concentrationReading.js +0 -1
- package/lib/exercises/pc/motion/averageSpeedCalculation.js +4 -4
- package/lib/exercises/pc/motion/recognizeFreeFall.js +0 -2
- 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
|
@@ -92,9 +92,7 @@ export const averageWithTable = {
|
|
|
92
92
|
id: "averageWithTable",
|
|
93
93
|
connector: "=",
|
|
94
94
|
label: "Calcul de la moyenne d'un tableau d'effectifs",
|
|
95
|
-
levels: ["3ème", "2nde", "CAP", "2ndPro", "1rePro", "1reTech"],
|
|
96
95
|
isSingleStep: false,
|
|
97
|
-
sections: ["Statistiques"],
|
|
98
96
|
generator: (nb) => getDistinctQuestions(getAverageWithTableQuestion, nb),
|
|
99
97
|
qcmTimer: 60,
|
|
100
98
|
freeTimer: 60,
|
|
@@ -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
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intervalsIntersection.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/intervalsIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,OAAO,EAGL,uBAAuB,EAExB,MAAM,uCAAuC,CAAC;AAM/C,KAAK,WAAW,GAAG;IAOjB,eAAe,EAAE,uBAAuB,CAAC;IACzC,eAAe,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AA0KF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"intervalsIntersection.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/intervalsIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,OAAO,EAGL,uBAAuB,EAExB,MAAM,uCAAuC,CAAC;AAM/C,KAAK,WAAW,GAAG;IAOjB,eAAe,EAAE,uBAAuB,CAAC;IACzC,eAAe,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AA0KF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
|
|
@@ -154,9 +154,7 @@ export const intervalsIntersection = {
|
|
|
154
154
|
id: "intervalsIntersection",
|
|
155
155
|
connector: "=",
|
|
156
156
|
label: "Déterminer l'intersection de deux intervalles",
|
|
157
|
-
levels: ["2nde", "1reESM"],
|
|
158
157
|
isSingleStep: true,
|
|
159
|
-
sections: ["Ensembles et intervalles"],
|
|
160
158
|
generator: (nb) => getDistinctQuestions(getIntervalsIntersectionQuestion, nb),
|
|
161
159
|
qcmTimer: 60,
|
|
162
160
|
freeTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setBelonging.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/setBelonging.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAuHF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"setBelonging.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/setBelonging.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAuHF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAe9C,CAAC"}
|
|
@@ -116,9 +116,7 @@ export const setBelonging = {
|
|
|
116
116
|
id: "setBelonging",
|
|
117
117
|
connector: "\\iff",
|
|
118
118
|
label: "Déterminer le plus petit ensemble auquel un nombre appartient",
|
|
119
|
-
levels: ["2nde", "1reESM"],
|
|
120
119
|
isSingleStep: true,
|
|
121
|
-
sections: ["Ensembles et intervalles"],
|
|
122
120
|
generator: (nb) => getDistinctQuestions(getSetBelongingQuestion, nb),
|
|
123
121
|
qcmTimer: 60,
|
|
124
122
|
freeTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arcValue.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/arcValue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA4IF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"arcValue.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/arcValue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA4IF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAY1C,CAAC"}
|
|
@@ -120,9 +120,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
120
120
|
export const arcValue = {
|
|
121
121
|
id: "arcValue",
|
|
122
122
|
label: "Calculer un angle via son cosinus/sinus/tangente",
|
|
123
|
-
levels: ["1reSpé"],
|
|
124
123
|
isSingleStep: true,
|
|
125
|
-
sections: ["Trigonométrie"],
|
|
126
124
|
generator: (nb) => getDistinctQuestions(getArcValueQuestion, nb),
|
|
127
125
|
qcmTimer: 60,
|
|
128
126
|
freeTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,EACL,QAAQ,EAaT,MAAM,mBAAmB,CAAC;AAmD3B,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IAEf,gBAAgB,EAAE,eAAe,CAAC;CACnC,CAAC;AAkDF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,EACL,QAAQ,EAaT,MAAM,mBAAmB,CAAC;AAmD3B,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IAEf,gBAAgB,EAAE,eAAe,CAAC;CACnC,CAAC;AAkDF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
|
|
@@ -99,9 +99,7 @@ export const remarkableValuesExercise = {
|
|
|
99
99
|
id: "remarkableValues",
|
|
100
100
|
connector: "=",
|
|
101
101
|
label: "Valeurs remarquables de $\\cos$ et $\\sin$ (hors de $]-\\pi; \\pi]$)",
|
|
102
|
-
levels: ["1reSpé", "TermSpé", "MathComp"],
|
|
103
102
|
isSingleStep: true,
|
|
104
|
-
sections: ["Trigonométrie"],
|
|
105
103
|
generator: (nb) => getDistinctQuestions(getRemarkableValues, nb),
|
|
106
104
|
qcmTimer: 60,
|
|
107
105
|
freeTimer: 60,
|
|
@@ -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) => {
|
|
@@ -17,7 +17,7 @@ La masse de ${selectedPlanet.name} est de $${selectedPlanet.mass.toTex({
|
|
|
17
17
|
scientific: 2,
|
|
18
18
|
})}$.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Calculer la force gravitationnelle exercée par le Soleil sur ${selectedPlanet.name}.
|
|
21
21
|
|
|
22
22
|
Données:
|
|
23
23
|
- Constante de gravitation universelle: $G = ${G.toTex({
|
|
@@ -29,7 +29,7 @@ export {};
|
|
|
29
29
|
// const pressureDifference = round(density * g * deltaDepth, 2); // Différence de pression en Pa
|
|
30
30
|
// const questionText = `Dans un fluide incompressible de densité $\\rho = ${frenchify(
|
|
31
31
|
// density,
|
|
32
|
-
// )}\\ \\text{kg·m}^{-3}$,
|
|
32
|
+
// )}\\ \\text{kg·m}^{-3}$, déterminer la différence de pression $\\Delta P$ entre deux positions verticales de profondeur $z_1 = ${frenchify(
|
|
33
33
|
// depth1,
|
|
34
34
|
// )}\\ \\text{m}$ et $z_2 = ${frenchify(depth2)}\\ \\text{m}$.`;
|
|
35
35
|
// const hint = `La différence de pression entre deux positions dans un fluide incompressible est donnée par la relation :
|
|
@@ -93,9 +93,7 @@ export {};
|
|
|
93
93
|
// export const pressureDifferenceCalculation: Exercise<Identifiers> = {
|
|
94
94
|
// id: "pressureDifferenceCalculation",
|
|
95
95
|
// label: "Calculer la différence de pression dans un fluide incompressible",
|
|
96
|
-
// levels: ["1reSpé"],
|
|
97
96
|
// isSingleStep: true,
|
|
98
|
-
// sections: ["Fluides"],
|
|
99
97
|
// generator: (nb: number) =>
|
|
100
98
|
// getDistinctQuestions(getPressureDifferenceQuestion, nb),
|
|
101
99
|
// qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isolateVariables.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/math/isolateVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA6XF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"isolateVariables.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/math/isolateVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA6XF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|