math-exercises 1.3.22 → 1.3.24

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 (125) hide show
  1. package/lib/exercises/calcul/addAndSub.d.ts.map +1 -1
  2. package/lib/exercises/calcul/addAndSub.js +1 -0
  3. package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts.map +1 -1
  4. package/lib/exercises/calcul/addAndSubWithoutRelatives.js +1 -0
  5. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  6. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +1 -0
  7. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  8. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +1 -0
  9. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -1
  10. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +1 -0
  11. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts.map +1 -1
  12. package/lib/exercises/calcul/fractions/fractionsDivision.js +1 -0
  13. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -1
  14. package/lib/exercises/calcul/fractions/fractionsProduct.js +1 -0
  15. package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -1
  16. package/lib/exercises/calcul/fractions/fractionsSum.js +1 -0
  17. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts.map +1 -1
  18. package/lib/exercises/calcul/fractions/simplifyFraction.js +1 -0
  19. package/lib/exercises/calcul/operations/operationsPriorities.d.ts.map +1 -1
  20. package/lib/exercises/calcul/operations/operationsPriorities.js +1 -0
  21. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
  22. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +1 -0
  23. package/lib/exercises/calcul/rounding/rounding.d.ts.map +1 -1
  24. package/lib/exercises/calcul/rounding/rounding.js +1 -0
  25. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  26. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +1 -0
  27. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  28. package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +1 -0
  29. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  30. package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +1 -0
  31. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  32. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +1 -0
  33. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  34. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +1 -0
  35. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +2 -2
  36. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
  37. package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +1 -0
  38. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  39. package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +1 -0
  40. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
  41. package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +1 -0
  42. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  43. package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +1 -0
  44. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
  45. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +9 -19
  46. package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.d.ts +1 -1
  47. package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.d.ts.map +1 -1
  48. package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.js +11 -21
  49. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  50. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +1 -0
  51. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  52. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +1 -0
  53. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  54. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +1 -0
  55. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  56. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +1 -0
  57. package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  58. package/lib/exercises/derivation/derivative/thirdDegreeDerivative.js +2 -1
  59. package/lib/exercises/derivation/derivative/usualderivative.d.ts.map +1 -1
  60. package/lib/exercises/derivation/derivative/usualderivative.js +10 -4
  61. package/lib/exercises/exercise.d.ts +1 -0
  62. package/lib/exercises/exercise.d.ts.map +1 -1
  63. package/lib/exercises/exercises.d.ts.map +1 -1
  64. package/lib/exercises/exercises.js +2 -0
  65. package/lib/exercises/geometry/cartesian/midpoint.d.ts.map +1 -1
  66. package/lib/exercises/geometry/cartesian/midpoint.js +1 -0
  67. package/lib/exercises/percent/applyPercent.d.ts +1 -1
  68. package/lib/exercises/percent/applyPercent.d.ts.map +1 -1
  69. package/lib/exercises/percent/applyPercent.js +4 -5
  70. package/lib/exercises/percent/averageEvolutionRate.d.ts +1 -1
  71. package/lib/exercises/percent/averageEvolutionRate.d.ts.map +1 -1
  72. package/lib/exercises/percent/averageEvolutionRate.js +2 -1
  73. package/lib/exercises/percent/globalPercent.d.ts +1 -1
  74. package/lib/exercises/percent/globalPercent.d.ts.map +1 -1
  75. package/lib/exercises/percent/globalPercent.js +3 -4
  76. package/lib/exercises/percent/reciprocalPercentage.d.ts +1 -1
  77. package/lib/exercises/percent/reciprocalPercentage.d.ts.map +1 -1
  78. package/lib/exercises/percent/reciprocalPercentage.js +5 -9
  79. package/lib/exercises/powers/powersDivision.d.ts.map +1 -1
  80. package/lib/exercises/powers/powersDivision.js +1 -0
  81. package/lib/exercises/powers/powersOfTenToDecimal.d.ts.map +1 -1
  82. package/lib/exercises/powers/powersOfTenToDecimal.js +1 -0
  83. package/lib/exercises/powers/powersPower.d.ts.map +1 -1
  84. package/lib/exercises/powers/powersPower.js +1 -0
  85. package/lib/exercises/powers/powersProduct.d.ts.map +1 -1
  86. package/lib/exercises/powers/powersProduct.js +1 -0
  87. package/lib/exercises/powers/scientificToDecimal.d.ts.map +1 -1
  88. package/lib/exercises/powers/scientificToDecimal.js +1 -0
  89. package/lib/exercises/proba/conditionalProbability.d.ts.map +1 -1
  90. package/lib/exercises/proba/conditionalProbability.js +1 -0
  91. package/lib/exercises/proba/marginalAndConditionalFrequency.d.ts +4 -0
  92. package/lib/exercises/proba/marginalAndConditionalFrequency.d.ts.map +1 -0
  93. package/lib/exercises/proba/marginalAndConditionalFrequency.js +72 -0
  94. package/lib/exercises/proba/probabilityTree.d.ts +4 -0
  95. package/lib/exercises/proba/probabilityTree.d.ts.map +1 -0
  96. package/lib/exercises/proba/probabilityTree.js +66 -0
  97. package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
  98. package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -0
  99. package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
  100. package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.js +1 -0
  101. package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -1
  102. package/lib/exercises/sequences/arithmetic/arithmeticFindReason.js +1 -0
  103. package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts.map +1 -1
  104. package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +1 -0
  105. package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
  106. package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +1 -0
  107. package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
  108. package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.js +1 -0
  109. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  110. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +1 -0
  111. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
  112. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +1 -0
  113. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts.map +1 -1
  114. package/lib/exercises/sequences/geometric/geometricFindReason.js +1 -0
  115. package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
  116. package/lib/exercises/sequences/geometric/geometricReasonUsage.js +1 -0
  117. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
  118. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +1 -0
  119. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts.map +1 -1
  120. package/lib/exercises/squareRoots/simpifySquareRoot.js +1 -0
  121. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts.map +1 -1
  122. package/lib/exercises/trigonometry/mainRemarkableValues.js +1 -0
  123. package/lib/exercises/trigonometry/remarkableValues.d.ts.map +1 -1
  124. package/lib/exercises/trigonometry/remarkableValues.js +1 -0
  125. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"addAndSub.d.ts","sourceRoot":"","sources":["../../../src/exercises/calcul/addAndSub.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAS/B,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAiBhD"}
1
+ {"version":3,"file":"addAndSub.d.ts","sourceRoot":"","sources":["../../../src/exercises/calcul/addAndSub.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAS/B,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAkBhD"}
@@ -33,6 +33,7 @@ function getAddAndSubQuestions() {
33
33
  const question = {
34
34
  startStatement: statementTree.toTex(),
35
35
  answer: answer,
36
+ keys: [],
36
37
  };
37
38
  return question;
38
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"addAndSubWithoutRelatives.d.ts","sourceRoot":"","sources":["../../../src/exercises/calcul/addAndSubWithoutRelatives.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,QASvC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,QAAQ,CAgCvD"}
1
+ {"version":3,"file":"addAndSubWithoutRelatives.d.ts","sourceRoot":"","sources":["../../../src/exercises/calcul/addAndSubWithoutRelatives.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,QASvC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,QAAQ,CAiCvD"}
@@ -43,6 +43,7 @@ function getAddAndSubWithoutRelatives() {
43
43
  const question = {
44
44
  startStatement: statementTree.toTex(),
45
45
  answer: answer.toString(),
46
+ keys: [],
46
47
  };
47
48
  return question;
48
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAgBxD"}
1
+ {"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAiBxD"}
@@ -29,6 +29,7 @@ function getFractionAndIntegerDivision() {
29
29
  instruction: '',
30
30
  startStatement: statementTree.toTex(),
31
31
  answer: answerTree.toTex(),
32
+ keys: [],
32
33
  };
33
34
  return question;
34
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,yBAAyB,EAAE,QASvC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,QAAQ,CAavD"}
1
+ {"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,yBAAyB,EAAE,QASvC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,QAAQ,CAcvD"}
@@ -26,6 +26,7 @@ function getFractionAndIntegerProduct() {
26
26
  instruction: '',
27
27
  startStatement: statementTree.toTex(),
28
28
  answer: answerTree.toTex(),
29
+ keys: [],
29
30
  };
30
31
  return question;
31
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAYnD"}
1
+ {"version":3,"file":"fractionAndIntegerSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAanD"}
@@ -26,6 +26,7 @@ function getFractionAndIntegerSum() {
26
26
  instruction: '',
27
27
  startStatement: statementTree.toTex(),
28
28
  answer: answerTree.toTex(),
29
+ keys: [],
29
30
  };
30
31
  return question;
31
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,iBAAiB,EAAE,QAS/B,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,CAW/C"}
1
+ {"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,iBAAiB,EAAE,QAS/B,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,CAY/C"}
@@ -23,6 +23,7 @@ function getFractionsDivision() {
23
23
  instruction: '',
24
24
  startStatement: statementTree.toTex(),
25
25
  answer: answerTree.toTex(),
26
+ keys: [],
26
27
  };
27
28
  return question;
28
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,gBAAgB,EAAE,QAS9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAU9C"}
1
+ {"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,gBAAgB,EAAE,QAS9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAW9C"}
@@ -22,6 +22,7 @@ function getFractionsProduct() {
22
22
  const question = {
23
23
  startStatement: statementTree.toTex(),
24
24
  answer: answerTree.toTex(),
25
+ keys: [],
25
26
  };
26
27
  return question;
27
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC;AAEF,wBAAgB,eAAe,IAAI,QAAQ,CAU1C"}
1
+ {"version":3,"file":"fractionsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC;AAEF,wBAAgB,eAAe,IAAI,QAAQ,CAW1C"}
@@ -22,6 +22,7 @@ function getFractionsSum() {
22
22
  const question = {
23
23
  startStatement: statementTree.toTex(),
24
24
  answer: answerTree.toTex(),
25
+ keys: [],
25
26
  };
26
27
  return question;
27
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"simplifyFraction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/simplifyFraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI9D,eAAO,MAAM,gBAAgB,EAAE,QAS9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAO9C"}
1
+ {"version":3,"file":"simplifyFraction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/simplifyFraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI9D,eAAO,MAAM,gBAAgB,EAAE,QAS9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAQ9C"}
@@ -18,6 +18,7 @@ function getSimplifyFraction() {
18
18
  const question = {
19
19
  startStatement: rational.toTree().toTex(),
20
20
  answer: rational.simplify().toTree().toTex(),
21
+ keys: [],
21
22
  };
22
23
  return question;
23
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"operationsPriorities.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/operations/operationsPriorities.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,CA8F/C"}
1
+ {"version":3,"file":"operationsPriorities.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/operations/operationsPriorities.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,CA+F/C"}
@@ -92,6 +92,7 @@ function getPriorityQuestions() {
92
92
  const question = {
93
93
  startStatement,
94
94
  answer,
95
+ keys: [],
95
96
  };
96
97
  return question;
97
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"operationsPrioritiesWithoutRelative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/operations/operationsPrioritiesWithoutRelative.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,mCAAmC,EAAE,QASjD,CAAC;AAEF,wBAAgB,sCAAsC,IAAI,QAAQ,CAgOjE"}
1
+ {"version":3,"file":"operationsPrioritiesWithoutRelative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/operations/operationsPrioritiesWithoutRelative.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,mCAAmC,EAAE,QASjD,CAAC;AAEF,wBAAgB,sCAAsC,IAAI,QAAQ,CAiOjE"}
@@ -173,6 +173,7 @@ function getOperationsPrioritiesWithoutRelative() {
173
173
  const question = {
174
174
  startStatement,
175
175
  answer,
176
+ keys: [],
176
177
  };
177
178
  return question;
178
179
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAS5B,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC;AASF,wBAAgB,iBAAiB,CAAC,cAAc,GAAE,MAAU,GAAG,QAAQ,CAStE"}
1
+ {"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAS5B,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC;AASF,wBAAgB,iBAAiB,CAAC,cAAc,GAAE,MAAU,GAAG,QAAQ,CAUtE"}
@@ -79,6 +79,7 @@ function getRoundQuestions(precisionAsked = 0) {
79
79
  instruction: instructions[precisionAsked],
80
80
  startStatement: dec.toTree().toTex(),
81
81
  answer: dec.round(precisionAsked).toTree().toTex(),
82
+ keys: [],
82
83
  };
83
84
  return question;
84
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"doubleDistributivity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/doubleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAW1D"}
1
+ {"version":3,"file":"doubleDistributivity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/doubleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAY1D"}
@@ -25,6 +25,7 @@ function getDoubleDistributivityQuestion() {
25
25
  return {
26
26
  startStatement: statementTree.toTex(),
27
27
  answer: answerTree.toTex(),
28
+ keys: ['x'],
28
29
  };
29
30
  }
30
31
  exports.getDoubleDistributivityQuestion = getDoubleDistributivityQuestion;
@@ -1 +1 @@
1
- {"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,aAAa,EAAE,QAS3B,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAWnD"}
1
+ {"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,aAAa,EAAE,QAS3B,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAYnD"}
@@ -26,6 +26,7 @@ function getFirstIdentityQuestion() {
26
26
  return {
27
27
  startStatement: statementTree.toTex(),
28
28
  answer: answerTree.toTex(),
29
+ keys: ['x'],
29
30
  };
30
31
  }
31
32
  exports.getFirstIdentityQuestion = getFirstIdentityQuestion;
@@ -1 +1 @@
1
- {"version":3,"file":"secondIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/secondIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,cAAc,EAAE,QAS5B,CAAC;AAEF,wBAAgB,yBAAyB,IAAI,QAAQ,CAYpD"}
1
+ {"version":3,"file":"secondIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/secondIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,cAAc,EAAE,QAS5B,CAAC;AAEF,wBAAgB,yBAAyB,IAAI,QAAQ,CAapD"}
@@ -27,6 +27,7 @@ function getSecondIdentityQuestion() {
27
27
  return {
28
28
  startStatement: statementTree.toTex(),
29
29
  answer: answerTree.toTex(),
30
+ keys: ['x'],
30
31
  };
31
32
  }
32
33
  exports.getSecondIdentityQuestion = getSecondIdentityQuestion;
@@ -1 +1 @@
1
- {"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAW1D"}
1
+ {"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAY1D"}
@@ -27,6 +27,7 @@ function getSimpleDistributivityQuestion() {
27
27
  return {
28
28
  startStatement: statementTree.toTex(),
29
29
  answer: answerTree.toTex(),
30
+ keys: ['x'],
30
31
  };
31
32
  }
32
33
  exports.getSimpleDistributivityQuestion = getSimpleDistributivityQuestion;
@@ -1 +1 @@
1
- {"version":3,"file":"thirdIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/thirdIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,aAAa,EAAE,QAS3B,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAWnD"}
1
+ {"version":3,"file":"thirdIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/thirdIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,aAAa,EAAE,QAS3B,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAYnD"}
@@ -26,6 +26,7 @@ function getThirdIdentityQuestion() {
26
26
  return {
27
27
  startStatement: statementTree.toTex(),
28
28
  answer: answerTree.toTex(),
29
+ keys: ['x'],
29
30
  };
30
31
  }
31
32
  exports.getThirdIdentityQuestion = getThirdIdentityQuestion;
@@ -5,7 +5,7 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
5
5
  const randint_1 = require("../../../math/utils/random/randint");
6
6
  exports.equationSimpleSquare = {
7
7
  id: 'equationSimpleSquare',
8
- connector: '\\iff',
8
+ connector: '=',
9
9
  instruction: '',
10
10
  label: 'Résoudre une équation du second degré du type x² = a',
11
11
  levels: ['2', '1'],
@@ -38,8 +38,8 @@ function getEquationSimpleSquare() {
38
38
  answer = `\\emptyset`;
39
39
  const question = {
40
40
  instruction,
41
- startStatement: `S = `,
42
41
  answer,
42
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
43
43
  };
44
44
  return question;
45
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"equationType1Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType1Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAc3D"}
1
+ {"version":3,"file":"equationType1Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType1Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAe3D"}
@@ -31,6 +31,7 @@ function getEquationType1ExerciseQuestion() {
31
31
  const question = {
32
32
  startStatement: tree.toTex(),
33
33
  answer: `x = ${solution}`,
34
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
34
35
  };
35
36
  return question;
36
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAc3D"}
1
+ {"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAe3D"}
@@ -34,6 +34,7 @@ function getEquationType2ExerciseQuestion() {
34
34
  const question = {
35
35
  startStatement: tree.toTex(),
36
36
  answer: answer.toTex(),
37
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
37
38
  };
38
39
  return question;
39
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAgB3D"}
1
+ {"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAiB3D"}
@@ -35,6 +35,7 @@ function getEquationType3ExerciseQuestion() {
35
35
  const question = {
36
36
  startStatement: statementTree.toTex(),
37
37
  answer: answerTree.toTex(),
38
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
38
39
  };
39
40
  return question;
40
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"equationType4Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType4Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAmB3D"}
1
+ {"version":3,"file":"equationType4Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType4Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAoB3D"}
@@ -37,6 +37,7 @@ function getEquationType4ExerciseQuestion() {
37
37
  const question = {
38
38
  startStatement: statementTree.toTex(),
39
39
  answer: answerTree.toTex(),
40
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
40
41
  };
41
42
  return question;
42
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"firstDegreeEquation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/firstDegreeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,mBAAmB,EAAE,QASjC,CAAC;AAOF,wBAAgB,sBAAsB,IAAI,QAAQ,CAiBjD"}
1
+ {"version":3,"file":"firstDegreeEquation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/firstDegreeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,mBAAmB,EAAE,QASjC,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,QAAQ,CAYjD"}
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFirstDegreeEquation = exports.firstDegreeEquation = void 0;
4
4
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
5
  const randint_1 = require("../../../math/utils/random/randint");
6
- const round_1 = require("../../../math/utils/round");
6
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
7
+ const simplify_1 = require("../../../tree/parsers/simplify");
7
8
  exports.firstDegreeEquation = {
8
9
  id: 'firstDegreeEquation',
9
- connector: '\\iff',
10
+ connector: '=',
10
11
  instruction: '',
11
12
  label: 'Résoudre une équation du premier degré du type $\\frac{a}{x} = b$',
12
13
  levels: ['2', '1'],
@@ -14,25 +15,14 @@ exports.firstDegreeEquation = {
14
15
  isSingleStep: false,
15
16
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFirstDegreeEquation, nb),
16
17
  };
17
- 2;
18
- const pgcd = (a, b) => {
19
- if (b === 0)
20
- return a;
21
- return pgcd(b, a % b);
22
- };
23
18
  function getFirstDegreeEquation() {
24
- let a = (0, randint_1.randint)(-30, 30, [0]);
25
- let b = (0, randint_1.randint)(-30, 30, [0]);
26
- const instruction = `Résoudre l'équation suivante $\\frac{${a}}{x} = ${b}$`;
27
- let answer;
28
- if (a / b === (0, round_1.round)(a / b, 0))
29
- answer = `${a / b}`;
30
- else
31
- answer = `\\frac{${a / pgcd(a, b)}}{${b / pgcd(a, b)}}`;
19
+ const a = (0, randint_1.randint)(-30, 30, [0]);
20
+ const b = (0, randint_1.randint)(-30, 30, [0]);
32
21
  const question = {
33
- instruction,
34
- startStatement: `x = `,
35
- answer,
22
+ instruction: `Résoudre l'équation suivante $\\frac{${a}}{x} = ${b}$`,
23
+ startStatement: `x`,
24
+ answer: (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(a / b)).toTex(),
25
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
36
26
  };
37
27
  return question;
38
28
  }
@@ -1,4 +1,4 @@
1
- import { Exercise, Question } from "../../../exercises/exercise";
1
+ import { Exercise, Question } from '../../../exercises/exercise';
2
2
  export declare const firstDegreeGeneralEquation: Exercise;
3
3
  export declare function getFirstDegreeGeneralEquation(): Question;
4
4
  //# sourceMappingURL=firstDegreeGeneralEquation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"firstDegreeGeneralEquation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/firstDegreeGeneralEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AASF,wBAAgB,6BAA6B,IAAI,QAAQ,CAwBxD"}
1
+ {"version":3,"file":"firstDegreeGeneralEquation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/firstDegreeGeneralEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAaxD"}
@@ -2,11 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFirstDegreeGeneralEquation = exports.firstDegreeGeneralEquation = void 0;
4
4
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
+ const polynomial_1 = require("../../../math/polynomials/polynomial");
5
6
  const randint_1 = require("../../../math/utils/random/randint");
6
- const round_1 = require("../../../math/utils/round");
7
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
8
+ const simplify_1 = require("../../../tree/parsers/simplify");
7
9
  exports.firstDegreeGeneralEquation = {
8
10
  id: 'firstDegreeGeneralEquation',
9
- connector: '\\iff',
11
+ connector: '=',
10
12
  instruction: '',
11
13
  label: 'Résoudre une équation du premier degré du type ax + b = cx',
12
14
  levels: ['2', '1'],
@@ -14,27 +16,15 @@ exports.firstDegreeGeneralEquation = {
14
16
  isSingleStep: false,
15
17
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFirstDegreeGeneralEquation, nb),
16
18
  };
17
- const pgcd = (a, b) => {
18
- if (b === 0)
19
- return a;
20
- return pgcd(b, a % b);
21
- };
22
19
  function getFirstDegreeGeneralEquation() {
23
- let a = (0, randint_1.randint)(-20, 20);
24
- const b = (0, randint_1.randint)(-20, 20);
25
- const c = (0, randint_1.randint)(-20, 20);
26
- while (a == 0 || a == 1)
27
- a = (0, randint_1.randint)(-12, 12);
28
- const instruction = `Résoudre l'équation suivante $${a}x + ${b} = ${c}$`;
29
- let answer;
30
- if ((c - b) / a == (0, round_1.round)((c - b) / a, 0))
31
- answer = `${(c - b) / a}`;
32
- else
33
- answer = `\\frac{${(c - b) / pgcd((c - b), a)}}{${a / pgcd((c - b), a)}}`;
20
+ let a = (0, randint_1.randint)(-9, 10, [0]);
21
+ const b = (0, randint_1.randint)(-9, 10);
22
+ const c = (0, randint_1.randint)(-9, 10, [a, 0]);
34
23
  const question = {
35
- instruction,
36
- startStatement: `x = `,
37
- answer,
24
+ instruction: `Résoudre l'équation suivante $${new polynomial_1.Polynomial([b, a])} = ${new polynomial_1.Polynomial([0, c])}$`,
25
+ startStatement: `x`,
26
+ answer: (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(-b / (a - c))).toTex(),
27
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
38
28
  };
39
29
  return question;
40
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAUhD"}
1
+ {"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAWhD"}
@@ -26,6 +26,7 @@ function getFactoType1Question() {
26
26
  const question = {
27
27
  startStatement: statementTree.toTex(),
28
28
  answer: answerTree.toTex(),
29
+ keys: ['x'],
29
30
  };
30
31
  return question;
31
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAYhD"}
1
+ {"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAahD"}
@@ -27,6 +27,7 @@ function getFactoType1Question() {
27
27
  const question = {
28
28
  startStatement: statementTree.toTex(),
29
29
  answer: answerTree.toTex(),
30
+ keys: ['x'],
30
31
  };
31
32
  return question;
32
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAYhD"}
1
+ {"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAahD"}
@@ -26,6 +26,7 @@ function getFactoType1Question() {
26
26
  const question = {
27
27
  startStatement: statementTree.toTex(),
28
28
  answer: answerTree.toTex(),
29
+ keys: ['x'],
29
30
  };
30
31
  return question;
31
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,kBAAkB,EAAE,QAShC,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CA4BhD"}
1
+ {"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,kBAAkB,EAAE,QAShC,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CA6BhD"}
@@ -32,6 +32,7 @@ function getFactoType1Question() {
32
32
  const question = {
33
33
  startStatement: statementTree.toTex(),
34
34
  answer: answerTree.toTex(),
35
+ keys: ['x'],
35
36
  };
36
37
  return question;
37
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"thirdDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/thirdDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAgBnD"}
1
+ {"version":3,"file":"thirdDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/thirdDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAiBnD"}
@@ -23,8 +23,9 @@ function getThirdDegreeDerivative() {
23
23
  const derivative = polynomial.derivate();
24
24
  const question = {
25
25
  instruction: `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par $f(x) = ${polynomial.toString()}$ `,
26
- startStatement: `f'(x) = `,
26
+ startStatement: `f'(x)`,
27
27
  answer: derivative.toString(),
28
+ keys: ['x'],
28
29
  };
29
30
  return question;
30
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"usualderivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/usualderivative.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGpD,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AAEF,wBAAgB,kBAAkB,IAAI,QAAQ,CAgD7C"}
1
+ {"version":3,"file":"usualderivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/usualderivative.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGpD,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AAEF,wBAAgB,kBAAkB,IAAI,QAAQ,CAsD7C"}
@@ -24,26 +24,31 @@ function getUsualDerivative() {
24
24
  let answer = '';
25
25
  switch (flip) {
26
26
  case 1: {
27
+ // f(x) = c
27
28
  instruction += `$${c}$`;
28
29
  answer = `0`;
29
30
  break;
30
31
  }
31
32
  case 2: {
32
- instruction += `$${new polynomial_1.Polynomial([a, b]).toString()}$`;
33
+ // f(x) = ax + b
34
+ instruction += `$${new polynomial_1.Polynomial([b, a]).toString()}$`;
33
35
  answer = `${a}`;
34
36
  break;
35
37
  }
36
38
  case 3: {
37
- instruction += `$${new polynomial_1.Polynomial([a, b, c]).toString()}$`;
38
- answer = `${new polynomial_1.Polynomial([2 * a, b]).toString()}`;
39
+ // f(x) = ax² + bx + c
40
+ instruction += `$${new polynomial_1.Polynomial([c, b, a]).toString()}$`;
41
+ answer = `${new polynomial_1.Polynomial([b, 2 * a]).toString()}`;
39
42
  break;
40
43
  }
41
44
  case 4: {
45
+ //f(x) = a/x
42
46
  instruction += `$\\frac{${a}}{x}$`;
43
47
  answer = `\\frac{${-a}}{x^2}`;
44
48
  break;
45
49
  }
46
50
  case 5: {
51
+ // f(x) = a * sqrt(x)
47
52
  if (a === 1)
48
53
  instruction += `$\\sqrt{x}$`;
49
54
  else if (a === -1)
@@ -59,8 +64,9 @@ function getUsualDerivative() {
59
64
  }
60
65
  const question = {
61
66
  instruction,
62
- startStatement: `f'(x) = `,
67
+ startStatement: `f'(x)`,
63
68
  answer,
69
+ keys: ['x'],
64
70
  };
65
71
  return question;
66
72
  }
@@ -3,6 +3,7 @@ export interface Question {
3
3
  instruction?: string;
4
4
  startStatement?: string;
5
5
  answer: string;
6
+ keys?: string[];
6
7
  }
7
8
  export interface Exercise {
8
9
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC;IACtC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAAC;CAC/D"}
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC;IACtC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAAC;CAC/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"exercises.d.ts","sourceRoot":"","sources":["../../src/exercises/exercises.ts"],"names":[],"mappings":"AAkEA,eAAO,MAAM,SAAS,iCA6GrB,CAAC"}
1
+ {"version":3,"file":"exercises.d.ts","sourceRoot":"","sources":["../../src/exercises/exercises.ts"],"names":[],"mappings":"AAoEA,eAAO,MAAM,SAAS,iCA+GrB,CAAC"}
@@ -153,4 +153,6 @@ exports.exercises = [
153
153
  // leadingCoefficient,
154
154
  // derivativeNumberReading,
155
155
  //derivativeNumberReading2,
156
+ // probabilityTree,
157
+ // marginalAndConditionalFrequency,
156
158
  ];