[Tutor] Fahrenheit to Celsius Conversion another problem and Programming Paradigm

David Rock david at graniteweb.com
Thu Jun 15 14:39:16 EDT 2017


> On Jun 15, 2017, at 13:16, William Gan <ganwilliam at outlook.com> wrote:
> 
> Hi David,
> 
> Very much thanks for taking time to help.
> 
> Your explanation has helped me understand that syntax issue better. I have resolved that error.
> 
> Your counsel on the second issue has given me encouragement. Thank you.

I’m glad it helped.  For completeness, in case you didn’t notice, your elif statement has the same issue.

elif unit == 'F' or 'f’:
    c = (temp - 32) * 5 / 9
    print(str(temp) + ' F is equivalent to ' + "%.2f" % c + ' C.’


—
David Rock
david at graniteweb.com






More information about the Tutor mailing list