<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi I'm very much a beginner with Python. | I want to write a function to convert celcius to fahrenheit like this | one: | | def celciusToFahrenheit(tc): | tf = (9/5)*tc+32 | return tf
Unless you are importing 'integer division' or using 3.0, that should be 9.0/5.0. | I want the answer correct to one decimal place, so | celciusToFahrenheit(12) would return 53.6. As written, running above on 2.x returns 44. tjr -- http://mail.python.org/mailman/listinfo/python-list