3 Comments
User's avatar
Adriana Vanegas's avatar

Calculation includes the 32 within the parentheses, when it shouldn’t. Calculation should be: fahrenheit = celsius * (9 / 5) + 32

Expand full comment
Steven Elkind's avatar

misplaced parenthesis fahrenheit = celsius * (9 / 5 + 32) -> fahrenheit = celsius * (9 / 5) + 32

alternatively removing the parentheses will work fahrenheit = celsius * 9 / 5 + 32

Expand full comment
Vinod VV's avatar

The correct order is to multiply the celsius value by 9/5 first, then add 32. By using parentheses around (celsius * 9/5), ensure the multiplication happens before the addition.

Expand full comment