i need to write a loop program converting celsius to farenheit using the formula F=9*C/5+32 and terminating at -999

Votes + Comments
Shouldn't that be -273.15 Â°C (or -459.67 Â°F, as the case may be)? :)
5
Contributors
4
Replies
42
Views
3 Years
Discussion Span
Last Post by Slavi

Sorry, but we don't do your homework for you. FWIW, the actual formula is ((9/5)*C) + 32. Make sure you get your parens correct!

If you use the Search function of the forums, you ought to find several threads on this subject. I recommend this one, but then I am biased. :-)

That just leaves you with the loop and the exit condition test. I expect you can figure that part out yourself, though I do have a long history of having my hopes dashed in this regard...

Edited by Schol-R-LEA

F = 9 * C/5 + 32
Is the same as
F = (9/5) * C + 32

With Python2 / is integer division, so avoid it by using 5.0 instead of 5

Votes + Comments
Indeed!
Good point.

or instead you could
`from __future__ import division` =))

Edited by Slavi

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.