"Évaluation souhaitée pour le test de compétence Math 1"

bonjour @mikoMK ! cela fait longtemps :sweat_smile: :sweat_smile: :sweat_smile: :sweat_smile: , j’aimerai être évaluer sur les test de math s’il te plaît merci beaucoup bonne journée

Salut @fenosoaliva_ratovoson

You’re missing the link to your code. :grin:
Could you please add it?


salut @mikoMK ! :grin: j’ai oublié

Bonjour @fenosoaliva_ratovoson

Here are some comments:

Task 1:
You should always use const or let when creating variables. If you just use the variable name, you will create a global variable. That’s something we want to avoid. For example const a = 7; would be fine.
You calculate finalResult and immediately overwrite it in the next line. There should be
one line containing const finalResult = somme * reste;. This will save the result of the multiplication of the two values into finalResult.

Task 2:
You have some lines that don’t do anything. I don’t know if these are just remnants from some experiments you did or if you are expecting these lines to do something. I’m talking about:

typeof finalResult;
Number (finalResult);

Task 3:
The three comparison variables should contain a boolean (true or false). To achieve this we need a comparison operator on the right side (comparison operators). Some examples:

const a = 5;
const b = 8;

let result = a < b;
console.log(result); /* true */

result = a !== b;
console.log(result); /* true */

result = a >= b;
console.log(result); /* false */

I hope that helps. If you like you can try to improve your code and I can have a second look. :slightly_smiling_face:



Salut @mikoMK! merci pour vos conseils. J’ai refait mon code j’ai essayé de suivre vos conseils je ne sais pas si cette fois c’est bon, merci encore bonne journée

Tasks 1 and 2 are fine, now.

In task 3 you are assigning an array to the comparison variables. An array is always “true”. That’s why for example console.log(weightComparison); says true.
The correct code for the first comparison is:

let weightComparison = eleWeight < mouseWeight;

Since we use the “lesser than” operator (<) the right side evaluates to false. This value gets then assign to weightComparison.

1 Like

salut @mikoMK! ohhh merci beaucoup :blush:

1 Like