Kalvin weather solution pls!


Any body can tell me what’s wrong with my code ? I couldn’t acces to the next exercice !

// current temperature in kelvin degrees.
const kelvin = 293;
// converting kelvin to celsius.
const celsius = kelvin - 273;
// Convert celsius to fahrenheit.
let fahrenheit = celsius * (9 / 5) + 32;
// Round down fahrenheit variable.
fahrenheit = Math.floor(fahrenheit);
console.log(“value to log”);
console.log(The temperature is ${fahrenheit} degrees Fahrenheit.);
let newton = celsius * (33 / 100);
newton = Math.floor(newton);
console.log(The temperature is ${newton} degrees Newton.);

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:


I don’t recall those lines ever being asked for.

This is a minor concern but bears mention. Multiplying integers is much simpler for the computer than multiplying floats, and faster if we were to repeat this operation many, many times.

F = 32 + 9 * C / 5

The order of operations will be,

9 * C

then the division by 5, and finally the addition. Since the rounding is on the float, we could even write that into this operation…

fahrenheit = 32 + Math.floor(9 * celsius / 5);

Be sure to follow the instructions exactly and do not improvise or embellish until after you pass the exercise.


I got the right answer but I can’t get acces, why ?


Where in the instructions does it ask for lines 10, 11 and 12? If you are going to embellish your lesson then expect difficulty passing. But if that is not the case, then try a page refresh.


It still don’t work !

const kelvin = 0;
const celsius = kelvin - 273;
fahrenheit = 32 + Math.floor(9 * celsius / 5);
console.log(The temperature is ${fahrenheit} degrees Fahrenheit.);
let newton = celsius * (33 / 100);
newton = Math.floor(newton);
console.log(The temperature is ${newton} Newton.);


Okay, I finally found the exercise and see that it does ask for a newton conversion. My bad. It would help next time if you include a link to the exercise, and communicate a little more.

I also see that this is a free-form exercise with no lesson checker. We have to tick the boxes when we complete a step. It shows above that you have clicked on two of thirteen. Go down the list and tick the ones that are not already checked.


I can’t click on Next up bottom , I haven’t acces yet, I should get the right form of code.
may be It’s because the free-form so I can’t passe to the other exercice until I enroll in


This is the link for the exercice :slight_smile:



Did you check all the boxes next to earch instruction step? They all need to be checked so that the button bar at bottom reads 13/13.


off course, that’s why I have 13 string, and I don’t think the 13 means 13 tasks but it shows the 13 tests as the other previous test.




Oh no ! I’m really out ! Thank you so much, you’re great ^^