I’m confused. The equation is like they wrote it in the steps and i don’t get a decimal result out of it.
They wan’t me to subtract 273 from 293 Kelvin which is 20 and then convert it into Fahrenheit. Does Americans calculate different to Germans? Because even google says that it is correct.
(btw Celsius is not just Kelvin subtracted by 273. It’s 273.15)
but when i Math.floor i get 67.
Also google says it is straight out 68 when you convert 20 Celsius in Fahrenheit. |(20 °C × 9/5) + 32 = 68 °F|
glad i saw original reply in my emails. still makes no sense, but further down the road it was important to math.floor when i changed the kelvin values
What makes no sense? That they already rounded the difference between Celcius and Kelvin for an exercise that is rather about variables than temperature? Your screenshot shows the correct result.
At this stage it is more important to follow conventions in Javascript syntax: variables should be camelCased in order to be distinguishable from class names.
nono don’t get me wrong. I saw no sense to math.floor an already rounded number wich confused me in the process, thinks that might be something wrong and i don’t get it. that’s why i asked in this community. i attacked nobody so please do not attack me here. i’m 5 weeks into front-end path and i don’t want toxic Encounters here
0 deg C = 273 kelvins (we can forego the 0.15 since we’re not engineers)
0 deg C = 32 deg F
100 deg C = 212 deg F (at sea level)
From this we have enough information to formulate our own conversion factors and derive appropriate equations. The conversion factor for C to F is,
(212 - 32) / 100
since the change in C over the range from freezing to boiling of water (at sea level) is 100. We now know how many degrees F we increase for each 1 degree C. 1.8 deg F.
The offset of 0 to 32 is +32 so we need to include that in our calculation.
y deg F = 1.8 X x deg C + 32
From a standpoint of dimensional analysis,
9 deg F
y deg F = ------- X x deg C + 32
5 deg C
Now we see the C units cancel out, leaving us with F units.
It will be simple to work this so we can solve for deg C equivalence, and from there to solve for kelvins.
9 deg F
x deg F - 32 = ------- X y deg C
5 deg C
5 deg C
y deg C = ------- X (x deg F - 32)
9 deg F