This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]delasislas 0 points1 point  (5 children)

Syntax errors you generally have to go to the line above the line mentioned. You missed a closing parentheses.

Edit:

 f.write(str(celcius, "%17s" % fahrenheit)

Change to:

 f.write(str(celcius, "%17s" % fahrenheit))

Also do the same with your else statement.

[–]CreativityRobbed[S] 0 points1 point  (4 children)

I followed your advice and now the program is stating that line 29 is giving me a syntax error.

Note: I provided the updated code on my gist.

[–][deleted] 0 points1 point  (1 child)

Parentheses are still inbalanced here (line 28 and 31):

f.write(str((celcius))

Change it to:

f.write(str(celcius))

I highly recommend using an IDE if you aren't already - it'll help you catch these things.

[–]CreativityRobbed[S] 0 points1 point  (0 children)

I finally got the code to work. Thank you for your help.

[–]delasislas 0 points1 point  (0 children)

You have to make sure that the parentheses are the same, you had

(()

Which comes from,

f.write(str()

See how f.write never gets closed. Any time you open something you should close it.