I have to write a table called tempconv.txt, the table should have temps from -300-212 fah and the cel equivalents with steps of 10 or 20, presented in 2 columns.I keep getting a syntax error. I think i am having trouble with the opening and closing of the file. Thanks for any help.
def feh():
outfile = open("tempconv.txt","w")
outfile.write ("%10s%10s\n"%(feh,"cel"))
for i in range ( -300,240,120):
counterCelsius = (i -32) / 1.8
outfile.write("%10.3f %10.3f\n" %(i,convertCelsius)
outfile.close (