-2
My programming teacher asked this question and I couldn’t understand why I have to use one of these formulas to scale the temperature. And I couldn’t identify the right answer either. You have the temperature variable, which goes from -40 to +40. You want to change the variable colorVermine that goes from 0 to 255 as the temperature goes from -40 to +40. Which is the correct answer?
a.255*(temp+40)/80
b. 255*(temp-40)/40
c. 255-(temp+40)/80
d. 255*(temp-40)/80
e.255-(temp+40)/40
Excellent explanation! Gave to understand the step by step! It was very clear now!
– find83