math-exercises 2.2.41 → 2.2.43

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 (121) hide show
  1. package/lib/exercises/exercise.d.ts +54 -36
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/exercise.js +13 -1
  4. package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts +4 -1
  5. package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionsSum.js +24 -4
  7. package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
  8. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  9. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +3 -0
  10. package/lib/exercises/math/functions/affines/index.d.ts +1 -0
  11. package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
  12. package/lib/exercises/math/functions/affines/index.js +1 -0
  13. package/lib/exercises/math/functions/affines/isPointOnLine.d.ts +11 -0
  14. package/lib/exercises/math/functions/affines/isPointOnLine.d.ts.map +1 -0
  15. package/lib/exercises/math/functions/affines/isPointOnLine.js +97 -0
  16. package/lib/exercises/math/functions/logarithm/log10Simplifying.d.ts.map +1 -1
  17. package/lib/exercises/math/functions/logarithm/logPowerEquation.d.ts.map +1 -1
  18. package/lib/exercises/math/percent/evolutionRateFromValues.d.ts.map +1 -1
  19. package/lib/exercises/math/percent/evolutionRateFromValues.js +2 -2
  20. package/lib/exercises/math/percent/evolutionToCM.d.ts.map +1 -1
  21. package/lib/exercises/math/percent/evolutionToCM.js +3 -1
  22. package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
  23. package/lib/exercises/math/powers/powersPower.d.ts.map +1 -1
  24. package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
  25. package/lib/exercises/math/sequences/arithmetic/arithmeticReasonUsage.d.ts.map +1 -1
  26. package/lib/exercises/math/sequences/arithmetic/arithmeticReasonUsage.js +1 -0
  27. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
  28. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
  29. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +0 -3
  30. package/lib/exercises/utils/getDistinctQuestions.d.ts +1 -1
  31. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  32. package/lib/index.d.ts +518 -510
  33. package/lib/index.d.ts.map +1 -1
  34. package/lib/math/polynomials/affine.d.ts +1 -0
  35. package/lib/math/polynomials/affine.d.ts.map +1 -1
  36. package/lib/math/polynomials/affine.js +3 -0
  37. package/lib/math/sets/intervals/intervals.js +1 -1
  38. package/lib/math/systems/system.d.ts.map +1 -1
  39. package/lib/math/systems/system.js +29 -7
  40. package/lib/playground.d.ts.map +1 -1
  41. package/lib/playground.js +7 -1
  42. package/lib/server.js +9 -2
  43. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  44. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  45. package/lib/tree/nodes/functions/absNode.d.ts +1 -0
  46. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
  47. package/lib/tree/nodes/functions/absNode.js +3 -0
  48. package/lib/tree/nodes/functions/arcSinNode.d.ts +1 -0
  49. package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
  50. package/lib/tree/nodes/functions/arcSinNode.js +3 -0
  51. package/lib/tree/nodes/functions/arccosNode.d.ts +1 -0
  52. package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
  53. package/lib/tree/nodes/functions/arccosNode.js +3 -0
  54. package/lib/tree/nodes/functions/arctanNode.d.ts +1 -0
  55. package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
  56. package/lib/tree/nodes/functions/arctanNode.js +3 -0
  57. package/lib/tree/nodes/functions/cosNode.d.ts +1 -0
  58. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  59. package/lib/tree/nodes/functions/cosNode.js +3 -0
  60. package/lib/tree/nodes/functions/expNode.d.ts +1 -0
  61. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  62. package/lib/tree/nodes/functions/expNode.js +3 -0
  63. package/lib/tree/nodes/functions/log10Node.d.ts +1 -0
  64. package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
  65. package/lib/tree/nodes/functions/log10Node.js +3 -0
  66. package/lib/tree/nodes/functions/logNode.d.ts +1 -0
  67. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  68. package/lib/tree/nodes/functions/logNode.js +3 -0
  69. package/lib/tree/nodes/functions/oppositeNode.d.ts +1 -0
  70. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  71. package/lib/tree/nodes/functions/oppositeNode.js +3 -0
  72. package/lib/tree/nodes/functions/sinNode.d.ts +1 -0
  73. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  74. package/lib/tree/nodes/functions/sinNode.js +3 -0
  75. package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -0
  76. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  77. package/lib/tree/nodes/functions/sqrtNode.js +3 -0
  78. package/lib/tree/nodes/functions/tanNode.d.ts +1 -0
  79. package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
  80. package/lib/tree/nodes/functions/tanNode.js +3 -0
  81. package/lib/tree/nodes/geometry/degree.d.ts +1 -0
  82. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  83. package/lib/tree/nodes/geometry/degree.js +3 -0
  84. package/lib/tree/nodes/geometry/lengthNode.d.ts +1 -0
  85. package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
  86. package/lib/tree/nodes/geometry/lengthNode.js +3 -0
  87. package/lib/tree/nodes/node.d.ts.map +1 -1
  88. package/lib/tree/nodes/numbers/constantNode.d.ts +1 -0
  89. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
  90. package/lib/tree/nodes/numbers/constantNode.js +3 -0
  91. package/lib/tree/nodes/numbers/numberNode.d.ts +1 -0
  92. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  93. package/lib/tree/nodes/numbers/numberNode.js +3 -0
  94. package/lib/tree/nodes/operators/addNode.d.ts +1 -0
  95. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  96. package/lib/tree/nodes/operators/addNode.js +44 -0
  97. package/lib/tree/nodes/operators/divideNode.d.ts +1 -0
  98. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  99. package/lib/tree/nodes/operators/divideNode.js +3 -0
  100. package/lib/tree/nodes/operators/fractionNode.d.ts +1 -0
  101. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  102. package/lib/tree/nodes/operators/fractionNode.js +5 -2
  103. package/lib/tree/nodes/operators/limitNode.d.ts +1 -0
  104. package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
  105. package/lib/tree/nodes/operators/limitNode.js +3 -0
  106. package/lib/tree/nodes/operators/multiplyNode.d.ts +1 -0
  107. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  108. package/lib/tree/nodes/operators/multiplyNode.js +3 -0
  109. package/lib/tree/nodes/operators/powerNode.d.ts +1 -0
  110. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  111. package/lib/tree/nodes/operators/powerNode.js +3 -0
  112. package/lib/tree/nodes/operators/substractNode.d.ts +1 -0
  113. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  114. package/lib/tree/nodes/operators/substractNode.js +3 -0
  115. package/lib/tree/nodes/variables/variableNode.d.ts +1 -0
  116. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  117. package/lib/tree/nodes/variables/variableNode.js +5 -0
  118. package/lib/tree/parsers/rationalParser.d.ts +1 -0
  119. package/lib/tree/parsers/rationalParser.d.ts.map +1 -0
  120. package/lib/tree/parsers/rationalParser.js +9 -0
  121. package/package.json +1 -1
@@ -4,7 +4,23 @@ export declare const addValidProp: (props: Proposition[], statement: string, for
4
4
  export declare const addWrongProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
5
5
  export declare const tryToAddWrongProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
6
6
  export declare const shuffleProps: (props: Proposition[], n: number) => Proposition[];
7
- export type GeneratorOptions = {};
7
+ export declare enum GeneratorOptionTarget {
8
+ generation = 0,
9
+ vea = 1,
10
+ ggb = 2,
11
+ instruction = 3,
12
+ hint = 4,
13
+ correction = 5,
14
+ answer = 6,
15
+ qcm = 7,
16
+ keys = 8
17
+ }
18
+ export type GeneratorOption = {
19
+ id: string;
20
+ label: string;
21
+ type: "checkbox" | "select";
22
+ target: GeneratorOptionTarget;
23
+ };
8
24
  export type Proposition = {
9
25
  id: string;
10
26
  statement: string;
@@ -37,7 +53,7 @@ export type GeogebraOptions = {
37
53
  export type KeyboardOptions = {
38
54
  parenthesisShouldNotProduceLeftRight?: boolean;
39
55
  };
40
- export interface Question<TIdentifiers = {}> {
56
+ export interface Question<TIdentifiers = {}, TOptions = {}> {
41
57
  instruction: string;
42
58
  hint?: string;
43
59
  correction?: string;
@@ -54,40 +70,42 @@ export interface Question<TIdentifiers = {}> {
54
70
  };
55
71
  divisionFormat?: "fraction" | "obelus";
56
72
  identifiers: TIdentifiers;
73
+ options?: TOptions;
57
74
  }
58
- export type QCMGenerator<TIdentifiers> = (n: number, args: {
75
+ export type QCMGenerator<TIdentifiers, TOptions = {}> = (n: number, args: {
59
76
  answer: string;
60
- } & TIdentifiers) => Proposition[];
61
- export type VEA<TIdentifiers> = (studentAnswer: string, args: {
77
+ } & TIdentifiers, options?: TOptions) => Proposition[];
78
+ export type VEA<TIdentifiers, TOptions = {}> = (studentAnswer: string, args: {
62
79
  answer: string;
63
- } & TIdentifiers) => boolean;
64
- export type GGBVEA<TIdentifiers> = (studentAnswer: string[], args: {
80
+ } & TIdentifiers, options?: TOptions) => boolean;
81
+ export type GGBVEA<TIdentifiers, TOptions = {}> = (studentAnswer: string[], args: {
65
82
  ggbAnswer: string[];
66
- } & TIdentifiers) => boolean;
67
- export type QuestionGenerator<TIdentifiers = {}, TOptions = {}> = (opts?: TOptions) => Question<TIdentifiers>;
68
- export type GetHint<TIdentifiers, TPreBuiltObjects = {}> = (args: TIdentifiers, objects?: TPreBuiltObjects) => string;
69
- export type GetCorrection<TIdentifiers> = (args: TIdentifiers) => string;
70
- export type GetInstruction<TIdentifiers> = (args: TIdentifiers) => string;
71
- export type GetAnswer<TIdentifiers> = (args: TIdentifiers) => string;
72
- export type GetKeys<TIdentifiers> = (args: TIdentifiers) => (KeyId | KeyProps)[];
73
- export type GetGGBAnswer<TIdentifiers> = (args: TIdentifiers) => string[];
74
- export type GetGGBOptions<TIdentifiers> = (args: TIdentifiers) => GeogebraOptions;
75
- export type GetStudentGGBOptions<TIdentifiers> = (args: TIdentifiers) => GeogebraOptions;
76
- export type RebuildIdentifiers<TIdentifiers> = (oldIdentifiers: any) => TIdentifiers;
77
- export type GetQuestionFromIdentifiers<TIdentifiers> = (identifiers: TIdentifiers) => Question<TIdentifiers>;
78
- export type QuestionHotFix<TIdentifiers> = (q: Question<TIdentifiers>) => Question<TIdentifiers>;
83
+ } & TIdentifiers, options?: TOptions) => boolean;
84
+ export type QuestionGenerator<TIdentifiers = {}, TOptions = any> = (opts?: TOptions) => Question<TIdentifiers, TOptions>;
85
+ export type GetHint<TIdentifiers, TOptions = {}> = (args: TIdentifiers, options?: TOptions) => string;
86
+ export type GetCorrection<TIdentifiers, TOptions = {}> = (args: TIdentifiers, options?: TOptions) => string;
87
+ export type GetInstruction<TIdentifiers, TOptions = {}> = (args: TIdentifiers, options?: TOptions) => string;
88
+ export type GetAnswer<TIdentifiers, TOptions = {}> = (args: TIdentifiers, options?: TOptions) => string;
89
+ export type GetKeys<TIdentifiers, TOptions = {}> = (args: TIdentifiers, options?: TOptions) => (KeyId | KeyProps)[];
90
+ export type GetGGBAnswer<TIdentifiers, TOptions = {}> = (args: TIdentifiers, options?: TOptions) => string[];
91
+ export type GetGGBOptions<TIdentifiers, TOptions = {}> = (args: TIdentifiers, options?: TOptions) => GeogebraOptions;
92
+ export type GetStudentGGBOptions<TIdentifiers, TOptions = {}> = (args: TIdentifiers, options?: TOptions) => GeogebraOptions;
93
+ export type RebuildIdentifiers<TIdentifiers, TOptions = {}> = (oldIdentifiers: any, options?: TOptions) => TIdentifiers;
94
+ export type GetQuestionFromIdentifiers<TIdentifiers, TOptions = {}> = (identifiers: TIdentifiers, options?: TOptions) => Question<TIdentifiers>;
95
+ export type QuestionHotFix<TIdentifiers, TOptions = {}> = (q: Question<TIdentifiers>, options?: TOptions) => Question<TIdentifiers>;
79
96
  type PDFOptions = {
80
97
  shouldSpreadPropositions?: boolean;
81
98
  };
82
- export interface Exercise<TIdentifiers = {}> {
99
+ export interface Exercise<TIdentifiers = {}, TOptions = {}> {
83
100
  id: string;
84
101
  isSingleStep: boolean;
85
102
  label: string;
86
103
  pdfOptions?: PDFOptions;
104
+ options?: GeneratorOption[];
87
105
  sections?: (MathSection | PCSection)[];
88
106
  levels?: MathLevel[];
89
107
  connector?: "=" | "\\iff" | "\\approx";
90
- generator: (n: number) => Question<TIdentifiers>[];
108
+ generator: (n: number, opts?: TOptions) => Question<TIdentifiers, TOptions>[];
91
109
  maxAllowedQuestions?: number;
92
110
  answerType?: "GGB" | "QCM" | "free" | "QCU";
93
111
  isQCM?: boolean;
@@ -96,23 +114,23 @@ export interface Exercise<TIdentifiers = {}> {
96
114
  ggbTimer?: number;
97
115
  getPropositions?: QCMGenerator<{
98
116
  answer: string;
99
- } & TIdentifiers>;
100
- isAnswerValid?: VEA<TIdentifiers>;
101
- isGGBAnswerValid?: GGBVEA<TIdentifiers>;
117
+ } & TIdentifiers, TOptions>;
118
+ isAnswerValid?: VEA<TIdentifiers, TOptions>;
119
+ isGGBAnswerValid?: GGBVEA<TIdentifiers, TOptions>;
102
120
  hasGeogebra?: boolean;
103
121
  subject: "Mathématiques" | "Chimie" | "Physique";
104
122
  hasHintAndCorrection?: boolean;
105
- getInstruction?: GetInstruction<TIdentifiers>;
106
- getHint?: GetHint<TIdentifiers>;
107
- getCorrection?: GetCorrection<TIdentifiers>;
108
- getKeys?: GetKeys<TIdentifiers>;
109
- getAnswer?: GetAnswer<TIdentifiers>;
110
- getGGBAnswer?: GetGGBAnswer<TIdentifiers>;
111
- getGGBOptions?: GetGGBOptions<TIdentifiers>;
112
- getStudentGGBOptions?: GetStudentGGBOptions<TIdentifiers>;
113
- rebuildIdentifiers?: RebuildIdentifiers<TIdentifiers>;
114
- getQuestionFromIdentifiers?: GetQuestionFromIdentifiers<TIdentifiers>;
115
- hotFix?: QuestionHotFix<TIdentifiers>;
123
+ getInstruction?: GetInstruction<TIdentifiers, TOptions>;
124
+ getHint?: GetHint<TIdentifiers, TOptions>;
125
+ getCorrection?: GetCorrection<TIdentifiers, TOptions>;
126
+ getKeys?: GetKeys<TIdentifiers, TOptions>;
127
+ getAnswer?: GetAnswer<TIdentifiers, TOptions>;
128
+ getGGBAnswer?: GetGGBAnswer<TIdentifiers, TOptions>;
129
+ getGGBOptions?: GetGGBOptions<TIdentifiers, TOptions>;
130
+ getStudentGGBOptions?: GetStudentGGBOptions<TIdentifiers, TOptions>;
131
+ rebuildIdentifiers?: RebuildIdentifiers<TIdentifiers, TOptions>;
132
+ getQuestionFromIdentifiers?: GetQuestionFromIdentifiers<TIdentifiers, TOptions>;
133
+ hotFix?: QuestionHotFix<TIdentifiers, TOptions>;
116
134
  }
117
135
  export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
118
136
  export type MathSection = "Aires" | "Arithmétique" | "Calcul littéral" | "Calculs" | "Combinatoire et dénombrement" | "Conversions" | "Dérivation" | "Droites" | "Ensembles et intervalles" | "Équations" | "Équations différentielles" | "Exponentielle" | "Fonction cube" | "Fonction inverse" | "Fonctions" | "Fonctions affines" | "Fonctions de référence" | "Fractions" | "Géométrie cartésienne" | "Géométrie euclidienne" | "Inéquations" | "Intégration" | "Limites" | "Logarithme népérien" | "Logarithme décimal" | "Matrices" | "Nombres complexes" | "Périmètres" | "Pourcentages" | "Primitives" | "Probabilités" | "Produit scalaire" | "Proportionnalité" | "Python" | "Puissances" | "Python" | "Racines carrées" | "Second degré" | "Statistiques" | "Suites" | "Systèmes" | "Théorème de Pythagore" | "Théorème de Thalès" | "Trigonométrie" | "Valeur absolue" | "Vecteurs";
@@ -1 +1 @@
1
- {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,C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N,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,8BAA8B,GAC9B,aAAa,GACb,YAAY,GACZ,SAAS,GACT,0BAA0B,GAC1B,WAAW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAI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B,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shuffleProps = exports.tryToAddWrongProp = exports.addWrongProp = exports.addValidProp = void 0;
3
+ exports.GeneratorOptionTarget = exports.shuffleProps = exports.tryToAddWrongProp = exports.addWrongProp = exports.addValidProp = void 0;
4
4
  const shuffle_1 = require("../utils/alea/shuffle");
5
5
  const uuidv4_1 = require("uuidv4");
6
6
  const addValidProp = (props, statement, format = "tex") => {
@@ -36,3 +36,15 @@ const shuffleProps = (props, n) => {
36
36
  return (0, shuffle_1.shuffle)([props[0], ...(0, shuffle_1.shuffle)(props.slice(1)).slice(0, n - 1)]);
37
37
  };
38
38
  exports.shuffleProps = shuffleProps;
39
+ var GeneratorOptionTarget;
40
+ (function (GeneratorOptionTarget) {
41
+ GeneratorOptionTarget[GeneratorOptionTarget["generation"] = 0] = "generation";
42
+ GeneratorOptionTarget[GeneratorOptionTarget["vea"] = 1] = "vea";
43
+ GeneratorOptionTarget[GeneratorOptionTarget["ggb"] = 2] = "ggb";
44
+ GeneratorOptionTarget[GeneratorOptionTarget["instruction"] = 3] = "instruction";
45
+ GeneratorOptionTarget[GeneratorOptionTarget["hint"] = 4] = "hint";
46
+ GeneratorOptionTarget[GeneratorOptionTarget["correction"] = 5] = "correction";
47
+ GeneratorOptionTarget[GeneratorOptionTarget["answer"] = 6] = "answer";
48
+ GeneratorOptionTarget[GeneratorOptionTarget["qcm"] = 7] = "qcm";
49
+ GeneratorOptionTarget[GeneratorOptionTarget["keys"] = 8] = "keys";
50
+ })(GeneratorOptionTarget || (exports.GeneratorOptionTarget = GeneratorOptionTarget = {}));
@@ -3,6 +3,9 @@ type Identifiers = {
3
3
  rational: [number, number];
4
4
  rational2: [number, number];
5
5
  };
6
- export declare const fractionsSum: Exercise<Identifiers>;
6
+ type Options = {
7
+ allowNonIrreductible: boolean;
8
+ };
9
+ export declare const fractionsSum: Exercise<Identifiers, Options>;
7
10
  export {};
8
11
  //# sourceMappingURL=fractionsSum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B,CAAC;AA4DF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
1
+ {"version":3,"file":"fractionsSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC;AAgFF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAevD,CAAC"}
@@ -5,8 +5,9 @@ const exercise_1 = require("../../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
6
  const rational_1 = require("../../../../math/numbers/rationals/rational");
7
7
  const addNode_1 = require("../../../../tree/nodes/operators/addNode");
8
+ const latexParser_1 = require("../../../../tree/parsers/latexParser");
8
9
  const shuffle_1 = require("../../../../utils/alea/shuffle");
9
- const getFractionsSum = () => {
10
+ const getFractionsSum = (opts) => {
10
11
  const rational = rational_1.RationalConstructor.randomIrreductible();
11
12
  const rational2 = rational_1.RationalConstructor.randomIrreductible();
12
13
  const statementTree = new addNode_1.AddNode(rational.toTree(), rational2.toTree());
@@ -36,15 +37,33 @@ const getPropositions = (n, { answer, rational, rational2 }) => {
36
37
  }
37
38
  return (0, shuffle_1.shuffle)(propositions);
38
39
  };
39
- const isAnswerValid = (ans, { rational, rational2 }) => {
40
+ const isAnswerValid = (ans, { rational, rational2 }, opts) => {
40
41
  const rationalA = new rational_1.Rational(rational[0], rational[1]);
41
42
  const rationalB = new rational_1.Rational(rational2[0], rational2[1]);
43
+ const allow = opts?.allowNonIrreductible;
42
44
  const answerTree = rationalA
43
45
  .add(rationalB)
44
46
  .toTree({ allowFractionToDecimal: true });
45
47
  const texs = answerTree.toAllValidTexs();
46
- return texs.includes(ans);
48
+ if (allow)
49
+ try {
50
+ const parsed = (0, latexParser_1.parseLatex)(ans).simplify().toTex();
51
+ return texs.includes(parsed);
52
+ }
53
+ catch (err) {
54
+ return false;
55
+ }
56
+ else
57
+ return texs.includes(ans);
47
58
  };
59
+ const options = [
60
+ {
61
+ id: "allowNonIrreductible",
62
+ label: "Autoriser les fractions non réduites",
63
+ type: "checkbox",
64
+ target: exercise_1.GeneratorOptionTarget.vea,
65
+ },
66
+ ];
48
67
  exports.fractionsSum = {
49
68
  id: "fractionsSum",
50
69
  connector: "=",
@@ -52,10 +71,11 @@ exports.fractionsSum = {
52
71
  levels: ["4ème", "3ème", "2nde", "CAP", "2ndPro", "1rePro"],
53
72
  sections: ["Fractions"],
54
73
  isSingleStep: false,
55
- generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionsSum, nb),
74
+ generator: (nb, opts) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getFractionsSum(opts), nb),
56
75
  qcmTimer: 60,
57
76
  freeTimer: 60,
58
77
  getPropositions,
59
78
  isAnswerValid,
60
79
  subject: "Mathématiques",
80
+ options,
61
81
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA8ElC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAe7C,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAkB9C,CAAC"}
1
+ {"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA+ElC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAe7C,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAkB9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CA6DnE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CAkClE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,WAAW,CAKvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
1
+ {"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CA6DnE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CAkClE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,WAAW,CAKvD,CAAC;AAMF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
@@ -85,6 +85,9 @@ const isFirstIdentityAnswerValid = (ans, { a, b }) => {
85
85
  return texs.includes(ans);
86
86
  };
87
87
  exports.isFirstIdentityAnswerValid = isFirstIdentityAnswerValid;
88
+ const tests = () => {
89
+ //si identifiers = x,y alors questions devrait etre x,y et vea devrait accepter x,y,z
90
+ };
88
91
  exports.firstIdentity = {
89
92
  id: "idRmq1",
90
93
  connector: "=",
@@ -11,4 +11,5 @@ export * from "./affineAdjustmentRsquared";
11
11
  export * from "./affineAdjustmentComplete";
12
12
  export * from "./affineMeanValue";
13
13
  export * from "./affineExpressionFromTwoImages";
14
+ export * from "./isPointOnLine";
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC"}
@@ -27,3 +27,4 @@ __exportStar(require("./affineAdjustmentRsquared"), exports);
27
27
  __exportStar(require("./affineAdjustmentComplete"), exports);
28
28
  __exportStar(require("./affineMeanValue"), exports);
29
29
  __exportStar(require("./affineExpressionFromTwoImages"), exports);
30
+ __exportStar(require("./isPointOnLine"), exports);
@@ -0,0 +1,11 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ affineA: number;
4
+ affineB: number;
5
+ x: number;
6
+ y: number;
7
+ isOnLine: boolean;
8
+ };
9
+ export declare const isPointOnLine: Exercise<Identifiers>;
10
+ export {};
11
+ //# sourceMappingURL=isPointOnLine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isPointOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/isPointOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAoFF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAgB/C,CAAC"}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isPointOnLine = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const point_1 = require("../../../../math/geometry/point");
7
+ const affine_1 = require("../../../../math/polynomials/affine");
8
+ const randint_1 = require("../../../../math/utils/random/randint");
9
+ const coinFlip_1 = require("../../../../utils/alea/coinFlip");
10
+ const alignTex_1 = require("../../../../utils/latex/alignTex");
11
+ const randomLetter_1 = require("../../../../utils/strings/randomLetter");
12
+ const getPropositions = (n, { answer }) => {
13
+ const propositions = [];
14
+ (0, exercise_1.addValidProp)(propositions, answer, "raw");
15
+ (0, exercise_1.tryToAddWrongProp)(propositions, "Oui", "raw");
16
+ (0, exercise_1.tryToAddWrongProp)(propositions, "Non", "raw");
17
+ (0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir", "raw");
18
+ return (0, exercise_1.shuffleProps)(propositions, n);
19
+ };
20
+ const getAnswer = (identifiers) => {
21
+ return identifiers.isOnLine ? "Oui" : "Non";
22
+ };
23
+ const getInstruction = (identifiers) => {
24
+ const point = new point_1.Point((0, randomLetter_1.randomLetter)(true), identifiers.x.toTree(), identifiers.y.toTree());
25
+ const affine = new affine_1.Affine(identifiers.affineA, identifiers.affineB);
26
+ return `Le point $${point.toTexWithCoords()}$ appartient-il à la droite d'équation $${affine.toReducedEquation()}$ ?`;
27
+ };
28
+ const getHint = (identifiers) => {
29
+ return `Remplace $x$ dans l'équation de la droite par l'abscisse du point. Le point appartient à la droite si et seulement si le résultat est égal à l'ordonnée du point.`;
30
+ };
31
+ const getCorrection = (identifiers) => {
32
+ const affine = new affine_1.Affine(identifiers.affineA, identifiers.affineB);
33
+ const affineTree = affine.toTree();
34
+ const res = affine.calculate(identifiers.x).toTree().toTex();
35
+ return `On remplace $x$ dans l'équation de la droite par l'abscisse du point :
36
+
37
+ ${(0, alignTex_1.alignTex)([
38
+ [
39
+ "y",
40
+ "=",
41
+ affineTree.toDetailedEvaluation({ x: identifiers.x.toTree() }).toTex(),
42
+ ],
43
+ ["", "=", res],
44
+ ])}
45
+
46
+ ${identifiers.isOnLine
47
+ ? `On obtient bien l'ordonnée du point. Ainsi, le point appartient bien à la droite.`
48
+ : `On n'obtient pas l'ordonnée du point. Ainsi, le point n'appartient pas à la droite.`}
49
+ `;
50
+ };
51
+ const getKeys = (identifiers) => {
52
+ return [];
53
+ };
54
+ const isAnswerValid = (ans, { answer }) => {
55
+ throw Error("VEA not implemented");
56
+ };
57
+ const getIsPointOnLineQuestion = () => {
58
+ const affine = affine_1.AffineConstructor.random();
59
+ const x = (0, randint_1.randint)(-10, 10);
60
+ const isOnLine = (0, coinFlip_1.coinFlip)();
61
+ const yOnLine = affine.calculate(x);
62
+ const y = isOnLine ? yOnLine : yOnLine + (0, randint_1.randint)(-10, 10, [0]);
63
+ const identifiers = {
64
+ x,
65
+ y,
66
+ isOnLine,
67
+ affineA: affine.a,
68
+ affineB: affine.b,
69
+ };
70
+ const question = {
71
+ answer: getAnswer(identifiers),
72
+ instruction: getInstruction(identifiers),
73
+ keys: getKeys(identifiers),
74
+ answerFormat: "raw",
75
+ identifiers,
76
+ hint: getHint(identifiers),
77
+ correction: getCorrection(identifiers),
78
+ };
79
+ return question;
80
+ };
81
+ exports.isPointOnLine = {
82
+ id: "isPointOnLine",
83
+ connector: "=",
84
+ label: "Vérifier si un point appartient à une droite d'équation $y=ax+b$",
85
+ isSingleStep: true,
86
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIsPointOnLineQuestion, nb),
87
+ qcmTimer: 60,
88
+ freeTimer: 60,
89
+ getPropositions,
90
+ isAnswerValid,
91
+ subject: "Mathématiques",
92
+ getHint,
93
+ getCorrection,
94
+ getAnswer,
95
+ answerType: "QCU",
96
+ hasHintAndCorrection: true,
97
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"log10Simplifying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/log10Simplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AA0FF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAiBrD,CAAC;AACF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAiBnD,CAAC"}
1
+ {"version":3,"file":"log10Simplifying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/log10Simplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AA8FF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAiBrD,CAAC;AACF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAiBnD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"logPowerEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/logPowerEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAwGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAkBpD,CAAC"}
1
+ {"version":3,"file":"logPowerEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/logPowerEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AA0GF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAkBpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"evolutionRateFromValues.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/evolutionRateFromValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAiGF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAiBzD,CAAC"}
1
+ {"version":3,"file":"evolutionRateFromValues.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/evolutionRateFromValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAoGF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAiBzD,CAAC"}
@@ -38,7 +38,7 @@ t = \\frac{V_a-V_d}{V_d}\\times 100
38
38
  $$`;
39
39
  };
40
40
  const getCorrection = (identifiers) => {
41
- const answer = getAnswer(identifiers);
41
+ const answer = (0, round_1.round)(((identifiers.vf - identifiers.vd) / identifiers.vd) * 100, 2).frenchify();
42
42
  return `Si une valeur passe d'une valeur de départ $V_d$ à une valeur d'arrivée $V_a$, alors le taux d'évolution $t$ en pourcentage est donné par la formule :
43
43
 
44
44
  $$
@@ -47,7 +47,7 @@ $$
47
47
 
48
48
  Ici, on a $V_d = ${identifiers.vd.frenchify()}$ et $V_a = ${identifiers.vf.frenchify()}$.
49
49
 
50
- Donc, le taux d'évolution est :
50
+ Donc, le taux d'évolution, en pourcentage, est :
51
51
 
52
52
  ${(0, alignTex_1.alignTex)([
53
53
  [
@@ -1 +1 @@
1
- {"version":3,"file":"evolutionToCM.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/evolutionToCM.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAsEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
1
+ {"version":3,"file":"evolutionToCM.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/evolutionToCM.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAuEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const randint_1 = require("../../../math/utils/random/randint");
7
7
  const round_1 = require("../../../math/utils/round");
8
+ const numberParser_1 = require("../../../tree/parsers/numberParser");
8
9
  const getEvolutionToCmQuestion = () => {
9
10
  const evolution = (0, randint_1.randint)(-99, 101, [0]);
10
11
  const isHausse = evolution > 0;
@@ -42,7 +43,8 @@ const getPropositions = (n, { answer, evolution }) => {
42
43
  return (0, exercise_1.shuffleProps)(propositions, n);
43
44
  };
44
45
  const isAnswerValid = (ans, { answer }) => {
45
- return ans === answer;
46
+ const parsed = (0, numberParser_1.numberParser)(ans);
47
+ return parsed === answer;
46
48
  };
47
49
  exports.evolutionToCM = {
48
50
  id: "evolutionToCM",
@@ -1 +1 @@
1
- {"version":3,"file":"powersDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersDivision.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuFF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CA6BhD,CAAC;AACF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
1
+ {"version":3,"file":"powersDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersDivision.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyFF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CA6BhD,CAAC;AACF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"powersPower.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersPower.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,EACL,QAAQ,EAST,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CA6BlD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAiB7C,CAAC"}
1
+ {"version":3,"file":"powersPower.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersPower.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,EACL,QAAQ,EAST,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CA6BlD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAiB7C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"powersProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersProduct.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAIxB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6EF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CA8BpD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAkB/C,CAAC"}
1
+ {"version":3,"file":"powersProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersProduct.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAIxB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CA8BpD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAkB/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"arithmeticReasonUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticReasonUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAmCF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAavD,CAAC"}
1
+ {"version":3,"file":"arithmeticReasonUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticReasonUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAoCF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAavD,CAAC"}
@@ -32,6 +32,7 @@ const getPropositions = (n, { answer }) => {
32
32
  const isAnswerValid = (ans, { answer, startRank }) => {
33
33
  return [
34
34
  answer,
35
+ `u${startRank + 1}=${answer}`,
35
36
  `u_${startRank + 1}=${answer}`,
36
37
  `u_{${startRank + 1}}=${answer}`,
37
38
  ].includes(ans);
@@ -1 +1 @@
1
- {"version":3,"file":"arithmeticRecurrenceFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAsCF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAclE,CAAC"}
1
+ {"version":3,"file":"arithmeticRecurrenceFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAsCF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAclE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mainAngleMeasure.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/mainAngleMeasure.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AA+FF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAiBlD,CAAC"}
1
+ {"version":3,"file":"mainAngleMeasure.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/mainAngleMeasure.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AA4FF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAiBlD,CAAC"}
@@ -57,14 +57,11 @@ const isAnswerValid = (ans, { answer, degree }) => {
57
57
  const value = remarkableValues_1.mainTrigoValues.find((e) => e.degree === degree);
58
58
  try {
59
59
  const parsed = (0, latexParser_1.parseLatex)(ans);
60
- console.log("parsed", parsed);
61
60
  const simplified = parsed.simplify().toTex();
62
- console.log("simp", simplified);
63
61
  return simplified === answer;
64
62
  // return value.angle.toAllValidTexs().includes(ans);
65
63
  }
66
64
  catch (err) {
67
- console.log(err);
68
65
  return false;
69
66
  }
70
67
  };
@@ -7,5 +7,5 @@ export declare function equalTab<T>(array1: T[], array2: T[]): boolean;
7
7
  * @param max included
8
8
  * @returns
9
9
  */
10
- export declare const getDistinctQuestions: (generator: () => Question<any>, nb: number, max?: number, discriminator?: ((q1: Question<any>, q2: Question<any>) => boolean) | undefined) => Question<any>[];
10
+ export declare const getDistinctQuestions: (generator: () => Question<any, any>, nb: number, max?: number, discriminator?: ((q1: Question<any, any>, q2: Question<any, any>) => boolean) | undefined) => Question<any, any>[];
11
11
  //# sourceMappingURL=getDistinctQuestions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDistinctQuestions.d.ts","sourceRoot":"","sources":["../../../src/exercises/utils/getDistinctQuestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,WAOnD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,cACpB,MAAM,SAAS,GAAG,CAAC,MAC1B,MAAM,QACJ,MAAM,wBACS,SAAS,GAAG,CAAC,MAAM,SAAS,GAAG,CAAC,KAAK,OAAO,kBAChE,SAAS,GAAG,CAAC,EAaf,CAAC"}
1
+ {"version":3,"file":"getDistinctQuestions.d.ts","sourceRoot":"","sources":["../../../src/exercises/utils/getDistinctQuestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,WAOnD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,cACpB,MAAM,SAAS,GAAG,EAAE,GAAG,CAAC,MAC/B,MAAM,QACJ,MAAM,wBACS,SAAS,GAAG,EAAE,GAAG,CAAC,MAAM,SAAS,GAAG,EAAE,GAAG,CAAC,KAAK,OAAO,kBAC1E,SAAS,GAAG,EAAE,GAAG,CAAC,EAapB,CAAC"}