math-exercises 3.0.155 → 3.0.157

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.
Files changed (74) hide show
  1. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +1 -1
  2. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.d.ts +4 -1
  3. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.d.ts.map +1 -1
  4. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.js +148 -31
  5. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts +4 -1
  6. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
  7. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +124 -44
  8. package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.d.ts.map +1 -1
  9. package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.js +4 -1
  10. package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.d.ts.map +1 -1
  11. package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.js +5 -4
  12. package/lib/exercises/math/functions/linear/linearFromExercise.d.ts.map +1 -1
  13. package/lib/exercises/math/functions/linear/linearFromExercise.js +4 -3
  14. package/lib/exercises/math/geometry/euclidian/pinPointFromRotation.js +1 -1
  15. package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.js +1 -1
  16. package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.d.ts.map +1 -1
  17. package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.js +4 -5
  18. package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.js +4 -4
  19. package/lib/exercises/math/geometry/perimeters/circleCircumference.d.ts.map +1 -1
  20. package/lib/exercises/math/geometry/perimeters/circleCircumference.js +5 -3
  21. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.d.ts.map +1 -1
  22. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +18 -5
  23. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.d.ts.map +1 -1
  24. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +45 -21
  25. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.d.ts.map +1 -1
  26. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +33 -12
  27. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.d.ts.map +1 -1
  28. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +38 -15
  29. package/lib/exercises/math/percent/findTVA.d.ts.map +1 -1
  30. package/lib/exercises/math/percent/findTVA.js +17 -11
  31. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +1 -1
  32. package/lib/exercises/math/probaStat/basicProbas/index.d.ts +1 -0
  33. package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
  34. package/lib/exercises/math/probaStat/basicProbas/index.js +1 -1
  35. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableSituations.d.ts.map +1 -1
  36. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableSituations.js +114 -20
  37. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.js +2 -2
  38. package/lib/exercises/math/probaStat/basicProbas/rangeBasicProbas.js +1 -1
  39. package/lib/exercises/math/probaStat/stats1var/etendueTable.d.ts.map +1 -1
  40. package/lib/exercises/math/probaStat/stats1var/etendueTable.js +5 -1
  41. package/lib/exercises/math/probaStat/stats1var/medianWithList.js +1 -1
  42. package/lib/exercises/math/probaStat/stats1var/medianWithTable.d.ts.map +1 -1
  43. package/lib/exercises/math/probaStat/stats1var/medianWithTable.js +19 -5
  44. package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.js +1 -1
  45. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts.map +1 -1
  46. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.js +34 -29
  47. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.js +3 -3
  48. package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.js +2 -2
  49. package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.d.ts.map +1 -1
  50. package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.js +18 -10
  51. package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.js +1 -1
  52. package/lib/exercises/math/spaceGeometry/sphere/index.d.ts +2 -0
  53. package/lib/exercises/math/spaceGeometry/sphere/index.d.ts.map +1 -1
  54. package/lib/exercises/math/spaceGeometry/sphere/index.js +3 -1
  55. package/lib/exercises/math/spaceGeometry/sphere/pinPointLatLon.2d.d.ts +12 -0
  56. package/lib/exercises/math/spaceGeometry/sphere/pinPointLatLon.2d.d.ts.map +1 -0
  57. package/lib/exercises/math/spaceGeometry/sphere/pinPointLatLon.2d.js +205 -0
  58. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.d.ts +13 -0
  59. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.d.ts.map +1 -0
  60. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +215 -0
  61. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.3d.d.ts +14 -0
  62. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.3d.d.ts.map +1 -0
  63. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.3d.js +390 -0
  64. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -1
  65. package/lib/exercises/vea/setVEA.d.ts.map +1 -1
  66. package/lib/exercises/vea/setVEA.js +4 -0
  67. package/lib/geogebra/probas/probaWheelGGBCommands.d.ts.map +1 -1
  68. package/lib/geogebra/probas/probaWheelGGBCommands.js +2 -1
  69. package/lib/index.d.ts +24 -2
  70. package/lib/index.d.ts.map +1 -1
  71. package/lib/utils/arrays/dichoFilter.d.ts +2 -0
  72. package/lib/utils/arrays/dichoFilter.d.ts.map +1 -0
  73. package/lib/utils/arrays/dichoFilter.js +11 -0
  74. package/package.json +1 -1
@@ -1,14 +1,64 @@
1
- import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
1
+ import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
4
4
  import { probaWheelGGBCommands } from "../../../../geogebra/probas/probaWheelGGBCommands.js";
5
5
  import { randint } from "../../../../math/utils/random/randint.js";
6
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
7
+ import { dichoFilter } from "../../../../utils/arrays/dichoFilter.js";
8
+ import { mdTable } from "../../../../utils/markdown/mdTable.js";
9
+ const getDictEventsAndProba = (arrItem) => {
10
+ const outDict = {};
11
+ const indexesColorsUsed = [
12
+ ...new Set(arrItem.map((wheelItem) => wheelItem.indexColor)),
13
+ ];
14
+ //couleur
15
+ {
16
+ const dictColor = indexesColorsUsed.reduce((acc, i) => {
17
+ const nbIssues = arrItem.filter((itemX) => itemX.indexColor === i).length;
18
+ const nodeProba = frac(nbIssues, arrItem.length);
19
+ acc[i] = nodeProba;
20
+ return acc;
21
+ }, {});
22
+ outDict["couleur"] = dictColor;
23
+ }
24
+ const valuesUsed = [...new Set(arrItem.map((wheelItem) => wheelItem.value))];
25
+ //numéro
26
+ {
27
+ const dictValue = valuesUsed.reduce((acc, v) => {
28
+ const nbIssues = arrItem.filter((itemX) => itemX.value === v).length;
29
+ const nodeProba = frac(nbIssues, arrItem.length);
30
+ acc[v] = nodeProba;
31
+ return acc;
32
+ }, {});
33
+ outDict["numéro"] = dictValue;
34
+ }
35
+ //parité
36
+ {
37
+ const dictColor = [0, 1].reduce((acc, i) => {
38
+ const nbIssues = arrItem.filter((itemX) => itemX.value % 2 === i).length;
39
+ const nodeProba = frac(nbIssues, arrItem.length);
40
+ acc[i] = nodeProba;
41
+ return acc;
42
+ }, {});
43
+ outDict["parité"] = dictColor;
44
+ }
45
+ //geq5
46
+ {
47
+ const dictGeq5 = dichoFilter(arrItem.map((item) => item.value), (v) => v >= 5).reduce((acc, arrV, i) => {
48
+ const nodeProba = frac(arrV.length, arrItem.length);
49
+ acc[i] = nodeProba;
50
+ return acc;
51
+ }, {});
52
+ outDict["geq5"] = dictGeq5;
53
+ }
54
+ return outDict;
55
+ };
6
56
  //on note le numéro du secteur obtenu
7
57
  //on note la couleur du secteur obtenu
8
58
  //on note la parité du numéro obtenu
9
- const getPropositions = (n, { answer, items }) => {
59
+ //on note si le numéro est supérieur ou égal à 5
60
+ const getPropositions = (_arg1, { answer: _arg2, items }) => {
10
61
  const propositions = [];
11
- addValidProp(propositions, answer);
12
62
  const colors = [0, 0, 0, 0];
13
63
  const nums = [0, 0, 0, 0, 0, 0, 0, 0, 0];
14
64
  const pars = [0, 0];
@@ -32,7 +82,16 @@ const getPropositions = (n, { answer, items }) => {
32
82
  addValidProp(propositions, "On note la parité du secteur obtenu (pair ou impair)", "raw");
33
83
  else
34
84
  tryToAddWrongProp(propositions, "On note la parité du secteur obtenu (pair ou impair)", "raw");
35
- return shuffleProps(propositions, n);
85
+ if ((() => {
86
+ const [arrGeq5, arrLt5] = dichoFilter(items.map((item) => item.value), (v) => v >= 5);
87
+ return arrLt5.length === arrGeq5.length;
88
+ })()) {
89
+ addValidProp(propositions, "On note si le numéro obtenu est supérieur ou égal à $5$", "raw");
90
+ }
91
+ else {
92
+ tryToAddWrongProp(propositions, "On note si le numéro obtenu est supérieur ou égal à $5$", "raw");
93
+ }
94
+ return propositions;
36
95
  };
37
96
  const getInstruction = (identifiers) => {
38
97
  const { items } = identifiers;
@@ -45,22 +104,51 @@ const getHint = () => {
45
104
  };
46
105
  const getCorrection = (identifiers) => {
47
106
  const { items } = identifiers;
48
- const colors = [0, 0, 0, 0];
49
- const nums = [0, 0, 0, 0, 0, 0, 0, 0, 0];
50
- const pars = [0, 0];
51
- for (let i = 0; i < items.length; i++) {
52
- colors[items[i].indexColor]++;
53
- nums[items[i].value]++;
54
- if (items[i].value % 2 === 0)
55
- pars[0]++;
56
- else
57
- pars[1]++;
58
- }
107
+ const dictEventsAndProba = getDictEventsAndProba(items);
108
+ const arrAnswer = getPropositions(4, { answer: "", ...identifiers }).filter((proposition) => proposition.isRightAnswer);
59
109
  return `On détaille chaque situation :
60
110
 
61
- -
62
- -
63
- - `;
111
+ ${mdTable([
112
+ ["", ""],
113
+ ["Numéro", ""],
114
+ ["Issue", "Probabilité"],
115
+ ...Object.entries(dictEventsAndProba["numéro"]).map(([s, nodeProba]) => [
116
+ `$${s}$`,
117
+ `$${nodeProba.toTex()}$`,
118
+ ]),
119
+ ["", ""],
120
+ ["Couleur", ""],
121
+ ["Issue", "Probabilité"],
122
+ ...Object.entries(dictEventsAndProba["couleur"]).map(([s, nodeProba]) => {
123
+ const indexEvent = +s;
124
+ return [
125
+ ["rouge", "bleu", "vert", "orange"][indexEvent],
126
+ `$${nodeProba.toTex()}$`,
127
+ ];
128
+ }),
129
+ ["", ""],
130
+ ["Parité", ""],
131
+ ["Issue", "Probabilité"],
132
+ ...Object.entries(dictEventsAndProba["parité"]).map(([s, nodeProba]) => {
133
+ const indexEvent = +s;
134
+ return [["pair", "impair"][indexEvent], `$${nodeProba.toTex()}$`];
135
+ }),
136
+ ["", ""],
137
+ ["Supérieur ou égal à $5$", ""],
138
+ ["Issue", "Probabilité"],
139
+ ...Object.entries(dictEventsAndProba["geq5"]).map(([s, nodeProba]) => {
140
+ const indexEvent = +s;
141
+ return [["oui", "non"][indexEvent], `$${nodeProba.toTex()}$`];
142
+ }),
143
+ ])}
144
+
145
+ Les situations équiprobables sont celles où toutes les issues ont la même probabilité.
146
+ ${arrAnswer.length > 1 ? "Ce sont donc :" : `C'est donc :`}
147
+
148
+ ${arrAnswer.map((proposition) => `- ${proposition.statement}`).join(`
149
+ `)}
150
+
151
+ `;
64
152
  };
65
153
  const getGGBOptions = (identifiers) => {
66
154
  const { items } = identifiers;
@@ -89,13 +177,18 @@ const hasRightAnswer = (items) => {
89
177
  return (colors.filter((e) => !!e).every((i) => i === colors[0]) ||
90
178
  nums
91
179
  .filter((e) => !!e)
92
- .every((i) => i === nums[0] || pars.every((i) => i === pars[0])));
180
+ .every((i) => i === nums[0] || pars.every((i) => i === pars[0])) ||
181
+ (() => {
182
+ const [arrGeq5, arrLt5] = dichoFilter(items.map((item) => item.value), (v) => v >= 5);
183
+ return arrLt5.length === arrGeq5.length;
184
+ })());
93
185
  };
94
186
  const getPickEquiprobableSituationsQuestion = () => {
187
+ const nbWheelItems = randint(8, 11);
95
188
  let items = [];
96
189
  do {
97
190
  items = [];
98
- for (let i = 0; i < 9; i++) {
191
+ for (let i = 0; i < nbWheelItems; i++) {
99
192
  items.push({
100
193
  value: randint(1, 10),
101
194
  indexColor: randint(0, 4),
@@ -127,6 +220,7 @@ export const pickEquiprobableSituations = {
127
220
  subject: "Mathématiques",
128
221
  getHint,
129
222
  getCorrection,
223
+ hasHintAndCorrection: true,
130
224
  getInstruction,
131
225
  getGGBOptions,
132
226
  hasGeogebra: true,
@@ -122,7 +122,7 @@ const getGGBOptions = (identifiers) => {
122
122
  });
123
123
  };
124
124
  const getHint = () => {
125
- return `Compte le nombre d'issues réalisent chaque évènement et cherche lesquels sont égaux entre eux.`;
125
+ return `Compte le nombre d'issues qui réalisent chaque évènement et cherche lesquels sont égaux entre eux.`;
126
126
  };
127
127
  const getCorrection = (identifiers) => {
128
128
  const { arrItem, typeAsked } = identifiers;
@@ -280,7 +280,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
280
280
  export const pickEquiprobableTo = {
281
281
  id: "pickEquiprobableTo",
282
282
  connector: "=",
283
- label: "Déterminer les situations équiprobables à une situation donnée",
283
+ label: "Déterminer les évènements équiprobables",
284
284
  isSingleStep: true,
285
285
  generator: (nb, opts) => getDistinctQuestions(() => getPickEquiprobableToQuestion(opts), nb),
286
286
  qcmTimer: 60,
@@ -9,7 +9,7 @@ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
9
9
  const getInstruction = (identifiers) => {
10
10
  const { min, max, target, isIncluded } = identifiers;
11
11
  return `Sur un ordinateur, on exécute un programme qui retourne au hasard
12
- un nombre entier compris entre $${min.frenchify()}$ et $${max.frenchify()}$
12
+ un nombre entier compris entre $${min.frenchify()}$ inclus et $${max.frenchify()}$
13
13
  ${isIncluded ? "inclus" : "exclu"}.
14
14
 
15
15
  Quelle est la probabilité que le programme retourne $${target.frenchify()}$ ?`;
@@ -1 +1 @@
1
- {"version":3,"file":"etendueTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/etendueTable.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AA6GF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
1
+ {"version":3,"file":"etendueTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/etendueTable.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAmHF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
@@ -45,7 +45,11 @@ const getHint = () => {
45
45
  const getCorrection = (identifiers) => {
46
46
  const { randomValues } = identifiers;
47
47
  return `La plus grande valeur de cette série est $${randomValues[randomValues.length - 1]}$ et la plus petite est $${randomValues[0]}$.
48
-
48
+
49
+ $$
50
+ ${randomValues[randomValues.length - 1]} - ${randomValues[0]} = ${randomValues[randomValues.length - 1] - randomValues[0]}
51
+ $$
52
+
49
53
  L'étendue de la série est donc $${randomValues[randomValues.length - 1] - randomValues[0]}$.
50
54
  `;
51
55
  };
@@ -19,7 +19,7 @@ const getAnswer = (identifiers) => {
19
19
  return median([...sortedValues].sort((a, b) => a - b)).frenchify();
20
20
  };
21
21
  const getHint = (_, opts) => {
22
- 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.
22
+ return `La médiane est la valeur centrale de la série : il y a autant de valeurs inférieures à la médiane que de valeurs supérieures à la médiane.
23
23
 
24
24
  ${opts?.isOrdered
25
25
  ? "Les valeurs sont déjà rangées par ordre croissant."
@@ -1 +1 @@
1
- {"version":3,"file":"medianWithTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/medianWithTable.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAiIF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
1
+ {"version":3,"file":"medianWithTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/medianWithTable.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAiJF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
@@ -55,7 +55,6 @@ const getCorrection = (identifiers) => {
55
55
  eccs.push(s);
56
56
  }
57
57
  const total = eccs[eccs.length - 1];
58
- const rank = total / 2;
59
58
  return `On dresse le tableau des effectifs cumulés croissants (ECC) :
60
59
 
61
60
  ${mdTable([
@@ -64,11 +63,26 @@ ${mdTable([
64
63
  ["ECC", ...eccs.map((e) => dollarize(e))],
65
64
  ])}
66
65
 
67
- L'effectif total est donc $${total}$.
66
+ L'effectif total est donc $${total}$.
68
67
 
69
- Puisque $\\frac{${total}}{2} = ${rank.frenchify()}$, la médiane est ${rank % 1 === 0
70
- ? `entre la $${rank}$ème et la $${rank + 1}$ème valeur.`
71
- : `la $${Math.ceil(rank)}$ème valeur.`}
68
+ ${(() => {
69
+ switch (total % 2) {
70
+ case 0: {
71
+ const rank = total / 2;
72
+ return `L'effectif est pair. La médiane est entre la $${rank}$ème et la $${rank + 1}$ème valeur.`;
73
+ }
74
+ case 1: {
75
+ const rank = (total + 1) / 2;
76
+ return `L'effectif est impair.
77
+
78
+ $$
79
+ \\frac{${total}+1}{2} = ${rank.frenchify()}
80
+ $$
81
+
82
+ La médiane est la $${rank.frenchify()}$ème valeur.`;
83
+ }
84
+ }
85
+ })()}
72
86
 
73
87
  La médiane est donc $${getAnswer(identifiers)}$.`;
74
88
  };
@@ -89,7 +89,7 @@ Si l'on regarde les valeurs strictement supérieures à $${a.frenchify()}$ :
89
89
  ${valuesAboveA
90
90
  .map((v) => `
91
91
 
92
- $${v.frenchify()}$ est $${(v - a).frenchify()}$ points en dessus de $${a.frenchify()}$
92
+ $${v.frenchify()}$ est $${(v - a).frenchify()}$ points au dessus de $${a.frenchify()}$
93
93
 
94
94
  `)
95
95
  .join("")}
@@ -1 +1 @@
1
- {"version":3,"file":"headsOrTailsTwiceOutcomes.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAS9B,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AA+MF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
1
+ {"version":3,"file":"headsOrTailsTwiceOutcomes.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAS9B,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAsNF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
@@ -9,6 +9,7 @@ const arrStrOutcomeSmall = [`P`, `F`];
9
9
  const getInstruction = (identifiers) => {
10
10
  const { arrIndex } = identifiers;
11
11
  const strRand = arrIndex.join("");
12
+ const topRow = [`\\text{Lancer} \\ 1$ /// $\\text{Lancer} \\ 2`, "P", "F"];
12
13
  return `On tire deux fois à pile ou face avec une pièce de monnaie.
13
14
  On note les issues de cette expérience aléatoire dans le tableau ci-dessous.
14
15
 
@@ -18,14 +19,14 @@ ${(() => {
18
19
  {
19
20
  return random([
20
21
  `${mdTable([
21
- ["\\text{}", "\\text{Lancer 2 :} P", "\\text{Lancer 2 :} F"],
22
- ["\\text{Lancer 1 : } P", "\\text{...}", "(P,F)"],
23
- ["\\text{Lancer 1 : } F", "\\text{}", "\\text{}"],
22
+ topRow,
23
+ ["P", "\\text{...}", "(P;F)"],
24
+ ["F", "\\text{}", "\\text{}"],
24
25
  ], true)}`,
25
26
  `${mdTable([
26
- ["\\text{}", "\\text{Lancer 2 :} P", "\\text{Lancer 2 :} F"],
27
- ["\\text{Lancer 1 : } P", "\\text{...}", "\\text{}"],
28
- ["\\text{Lancer 1 : } F", "(F,P)", "\\text{}"],
27
+ topRow,
28
+ ["P", "\\text{...}", "\\text{}"],
29
+ ["F", "(F;P)", "\\text{}"],
29
30
  ], true)}`,
30
31
  ]);
31
32
  }
@@ -34,14 +35,14 @@ ${(() => {
34
35
  {
35
36
  return random([
36
37
  `${mdTable([
37
- ["\\text{}", "\\text{Lancer 2 :} P", "\\text{Lancer 2 :} F"],
38
- ["\\text{Lancer 1 : } P", "(P,P)", "\\text{...}"],
39
- ["\\text{Lancer 1 : } F", "\\text{}", "\\text{}"],
38
+ topRow,
39
+ ["P", "(P;P)", "\\text{...}"],
40
+ ["F", "\\text{}", "\\text{}"],
40
41
  ], true)}`,
41
42
  `${mdTable([
42
- ["\\text{}", "\\text{Lancer 2 :} P", "\\text{Lancer 2 :} F"],
43
- ["\\text{Lancer 1 : } P", "\\text{}", "\\text{...}"],
44
- ["\\text{Lancer 1 : } F", "\\text{}", "(F,F)"],
43
+ topRow,
44
+ ["P", "\\text{}", "\\text{...}"],
45
+ ["F", "\\text{}", "(F;F)"],
45
46
  ], true)}`,
46
47
  ]);
47
48
  }
@@ -50,14 +51,14 @@ ${(() => {
50
51
  {
51
52
  return random([
52
53
  `${mdTable([
53
- ["\\text{}", "\\text{Lancer 2 :} P", "\\text{Lancer 2 :} F"],
54
- ["\\text{Lancer 1 : } P", "(P,P)", "\\text{}"],
55
- ["\\text{Lancer 1 : } F", "\\text{...}", "\\text{}"],
54
+ topRow,
55
+ ["P", "(P;P)", "\\text{}"],
56
+ ["F", "\\text{...}", "\\text{}"],
56
57
  ], true)}`,
57
58
  `${mdTable([
58
- ["\\text{}", "\\text{Lancer 2 :} P", "\\text{Lancer 2 :} F"],
59
- ["\\text{Lancer 1 : } P", "\\text{}", "\\text{}"],
60
- ["\\text{Lancer 1 : } F", "\\text{...}", "(F,F)"],
59
+ topRow,
60
+ ["P", "\\text{}", "\\text{}"],
61
+ ["F", "\\text{...}", "(F;F)"],
61
62
  ], true)}`,
62
63
  ]);
63
64
  }
@@ -66,14 +67,14 @@ ${(() => {
66
67
  {
67
68
  return random([
68
69
  `${mdTable([
69
- ["\\text{}", "\\text{Lancer 2 :} P", "\\text{Lancer 2 :} F"],
70
- ["\\text{Lancer 1 : } P", "\\text{}", "(P,F)"],
71
- ["\\text{Lancer 1 : } F", "\\text{}", "\\text{...}"],
70
+ topRow,
71
+ ["P", "\\text{}", "(P;F)"],
72
+ ["F", "\\text{}", "\\text{...}"],
72
73
  ], true)}`,
73
74
  `${mdTable([
74
- ["\\text{}", "\\text{Lancer 2 :} P", "\\text{Lancer 2 :} F"],
75
- ["\\text{Lancer 1 : } P", "\\text{}", "\\text{}"],
76
- ["\\text{Lancer 1 : } F", "(F,P)", "\\text{...}"],
75
+ topRow,
76
+ ["P", "\\text{}", "\\text{}"],
77
+ ["F", "(F;P)", "\\text{...}"],
77
78
  ], true)}`,
78
79
  ]);
79
80
  }
@@ -106,17 +107,14 @@ const getCorrection = (identifiers) => {
106
107
  ? highlighted(strEventSmall)
107
108
  : strEventSmall;
108
109
  });
110
+ const topRow = [`\\text{Lancer 1}$ /// $\\text{Lancer 2}`, "P", "F"];
109
111
  return `Dans le tableau ci-dessous,
110
112
  le premier élément dans la parenthèse désigne le résultat du premier lancer
111
113
  et le deuxième élémént le résultat du deuxième lancer.
112
114
 
113
115
  $P$ désigne $Pile$ et $F$ désigne $Face$.
114
116
 
115
- ${mdTable([
116
- ["\\text{}", "\\text{Lancer 2 :} P", "\\text{Lancer 2 :} F"],
117
- ["\\text{Lancer 1 : } P", arrStr[0], arrStr[2]],
118
- ["\\text{Lancer 1 : } F", arrStr[1], arrStr[3]],
119
- ], true)}
117
+ ${mdTable([topRow, ["P", arrStr[0], arrStr[2]], ["F", arrStr[1], arrStr[3]]], true)}
120
118
  `;
121
119
  };
122
120
  const getPropositions = (n, { answer }) => {
@@ -153,6 +151,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
153
151
  identifiers,
154
152
  hint: getHint(identifiers),
155
153
  correction: getCorrection(identifiers),
154
+ style: {
155
+ tableOptions: {
156
+ firstColumnIsHeader: false,
157
+ firstRowIsHeader: false,
158
+ firstCellIsDivided: true,
159
+ },
160
+ },
156
161
  };
157
162
  return question;
158
163
  };
@@ -85,9 +85,9 @@ const getCorrection = (identifiers) => {
85
85
  return `Dans le tableau ci-dessous, on a indiqué en vert les issues qui réalisent l'évènement "${event.str}" :
86
86
 
87
87
  ${mdTable([
88
- ["\\text{}", "\\text{Lancer 2 :} P", "\\text{Lancer 2 :} F"],
89
- ["\\text{Lancer 1 : } P", arrStr[0], arrStr[2]],
90
- ["\\text{Lancer 1 : } F", arrStr[1], arrStr[3]],
88
+ [`\\text{Lancer} \\ 1$ /// $\\text{Lancer} \\ 2`, "P", "F"],
89
+ ["P", arrStr[0], arrStr[2]],
90
+ ["F", arrStr[1], arrStr[3]],
91
91
  ], true)}
92
92
 
93
93
  Sur les $${nbOutcomes.frenchify()}$ issues possibles, ${nbRealized === 1 ? "une seule réalise" : `$${nbRealized}$ réalisent`} l'évènement "${event.str}".
@@ -109,9 +109,9 @@ const getCorrection = (identifiers) => {
109
109
  return `Dans le tableau ci-dessous, on a indiqué en vert les issues qui réalisent l'évènement "${event.str}" :
110
110
 
111
111
  ${mdTable([
112
- ["\\text{}", ...numberPool.map((i) => `n_2 : ${i}`)],
112
+ ["n_1$ /// $n_2", ...numberPool.map((i) => `${i}`)],
113
113
  ...Object.entries(arrArrStr).map(([s, arrStr]) => [
114
- `n_1 : ${+s}`,
114
+ `${+s}`,
115
115
  ...Object.values(arrStr),
116
116
  ]),
117
117
  ], true)}
@@ -1 +1 @@
1
- {"version":3,"file":"twoStepExperimentProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AA0B9B,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CACpB,CAAC;AAyiBF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
1
+ {"version":3,"file":"twoStepExperimentProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AA0B9B,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CACpB,CAAC;AAijBF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
@@ -120,10 +120,12 @@ Quelle est la probabilité de l'évènement "La valeur de la somme en euros cont
120
120
  const nodeP = frac(nbIssuesSatisfyingE, nbIssuesTotal);
121
121
  return `On peut construire le tableau ci-dessous :
122
122
  ${mdTable([
123
- ["Somme en euros", ...values[0].map(() => ``)],
124
- [``, ...values[0].map((v0) => `$${v0.frenchify()}\\ \\textrm{€}$`)],
123
+ [
124
+ `$\\text{Billet}(\\textrm{€})$ /// $\\text{Pièce}(\\textrm{€})$`,
125
+ ...values[0].map((v0) => `$${v0.frenchify()}$`),
126
+ ],
125
127
  ...values[1].map((v1) => [
126
- `$${v1.frenchify()}\\ \\textrm{€}$`,
128
+ `$${v1.frenchify()}$`,
127
129
  ...values[0].map((v0) => {
128
130
  const strStd = `${(v0 + v1).frenchify()}`;
129
131
  if (isRealizingEvent(v0, v1)) {
@@ -189,10 +191,12 @@ Quelle est la probabilité de l'évènement "La valeur de la somme en euros cont
189
191
  const nodeP = frac(nbIssuesSatisfyingE, nbIssuesTotal);
190
192
  return `On peut construire le tableau ci-dessous :
191
193
  ${mdTable([
192
- ["Somme", ...values[0].map(() => ``)],
193
- [``, ...values[0].map((v0) => `$${v0.frenchify()}\\ \\textrm{€}$`)],
194
+ [
195
+ `$\\text{Billet}(\\textrm{€})$ /// $\\text{Pièce}(\\textrm{€})$`,
196
+ ...values[0].map((v0) => `$${v0.frenchify()}$`),
197
+ ],
194
198
  ...values[1].map((v1) => [
195
- `$${v1.frenchify()}\\ \\textrm{€}$`,
199
+ `$${v1.frenchify()}$`,
196
200
  ...values[0].map((v0) => {
197
201
  const strStd = `${(v0 + v1).frenchify()}`;
198
202
  if (isRealizingEvent(v0, v1)) {
@@ -252,8 +256,10 @@ Quelle est la probabilité de l'évènement "La somme gagnée est supérieure ou
252
256
  const nodeP = frac(nbIssuesSatisfyingE, nbIssuesTotal);
253
257
  return `On peut construire le tableau ci-dessous :
254
258
  ${mdTable([
255
- ["Somme en euros", ...values[0].map(() => ``)],
256
- [``, ...values[0].map((v0) => `$${v0.frenchify()}\\ \\textrm{€}$`)],
259
+ [
260
+ `$\\text{Multiplicateur}$ /// $\\text{Base}(\\textrm{€})$`,
261
+ ...values[0].map((v0) => `$${v0.frenchify()}$`),
262
+ ],
257
263
  ...values[1].map((v1) => [
258
264
  `$\\times ${v1.frenchify()}$`,
259
265
  ...values[0].map((v0) => {
@@ -316,8 +322,10 @@ Quelle est la probabilité de l'évènement "La somme gagnée contient le chiffr
316
322
  const nodeP = frac(nbIssuesSatisfyingE, nbIssuesTotal);
317
323
  return `On peut construire le tableau ci-dessous :
318
324
  ${mdTable([
319
- ["Somme gagnée", ...values[0].map(() => ``)],
320
- [``, ...values[0].map((v0) => `$${v0.frenchify()}\\ \\textrm{€}$`)],
325
+ [
326
+ `$\\text{Multiplicateur}$ /// $\\text{Base}(\\textrm{€})$`,
327
+ ...values[0].map((v0) => `$${v0.frenchify()}$`),
328
+ ],
321
329
  ...values[1].map((v1) => [
322
330
  `$\\times ${v1.frenchify()}$`,
323
331
  ...values[0].map((v0) => {
@@ -961,7 +961,7 @@ const getAnswer = (identifiers) => {
961
961
  return pattern.str;
962
962
  };
963
963
  const getHint = () => {
964
- return `Les hachures indiquent les endroits où l'on plie le patron.
964
+ return `S'il y a des hachures sur le patron, sache qu'elles indiquent les endroits où le plier.
965
965
  Il n'y a pas de languettes sur les patrons en mathématiques.`;
966
966
  };
967
967
  const getCorrection = (identifiers) => {
@@ -1,2 +1,4 @@
1
1
  export * from "./pickIsPointInSphereOrBall.js";
2
+ export * from "./sphereLatLonReading.2d.js";
3
+ export * from "./pinPointLatLon.2d.js";
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/sphere/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/sphere/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAE/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export * from "./pickIsPointInSphereOrBall.js";
2
- // export * from "./sphereLatLonReading.js";
2
+ // export * from "./sphereLatLonReading.3d.js";
3
+ export * from "./sphereLatLonReading.2d.js";
4
+ export * from "./pinPointLatLon.2d.js";
@@ -0,0 +1,12 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { PointIdentifiers } from "../../../../math/geometry/point.js";
3
+ type Identifiers = {
4
+ pointsDict: Record<string, {
5
+ latLon: PointIdentifiers;
6
+ "2d": PointIdentifiers;
7
+ }>;
8
+ namePointTarget: string;
9
+ };
10
+ export declare const pinPointLatLon2d: Exercise<Identifiers>;
11
+ export {};
12
+ //# sourceMappingURL=pinPointLatLon.2d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pinPointLatLon.2d.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/sphere/pinPointLatLon.2d.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAoFtC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAChB,MAAM,EACN;QACE,MAAM,EAAE,gBAAgB,CAAC;QACzB,IAAI,EAAE,gBAAgB,CAAC;KACxB,CACF,CAAC;IACF,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAmKF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAiBlD,CAAC"}