[Tutor] why do i keep getting syntax errors in python when this runs

James Griffin jmz at kontrol.kode5.net
Sat Sep 7 09:09:25 CEST 2013


!-- On Fri  6.Sep'13 at  5:27:23 BST, mike johnson (pretorian at hotmail.com), wrote: 
> can you please help me figure out why this isnt working thanks
> # convert.py
> # this program is used to convert Celsius temps to Fahrenheit
> # By: James Michael Johnson
> 
> Def main ():
> Celsius = float (input ("What is the Celsius temperature? "))
> Fahrenheit = 9.0 / 5.0 * Celsius + 32
> Print ("The temperature is ", Fahrenheit, " degrees Fahrenheit.")
> 
> 
> Main ()

[ ...]

> # convert.py
> # this program is used to convert Celsius temps to Fahrenheit
> # By: James Michael Johnson
> 
> Def main ():
> Celsius = float (input ("What is the Celsius temperature? "))
> Fahrenheit = 9.0 / 5.0 * Celsius + 32
> Print ("The temperature is ", Fahrenheit, " degrees Fahrenheit.")
> 
> 
> Main ()

I'm sure this is homework. I had a peice of homework in my first year
Undergrad exactly like this. 

-- 


James Griffin: jmz at kontrol.kode5.net 

A4B9 E875 A18C 6E11 F46D  B788 BEE6 1251 1D31 DC38


More information about the Tutor mailing list