Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Python code help?
I keep getting this error
SyntaxError: unexpected character after line continuation character
this is my code
import math
print(‘We will convert a temperature from Fahrenheit to Celsius and Kelvin.’)
Temperature = input(“Enter temperature in Fahrenheit: “)
T = float(Temperature)
if T <= -459.67:
print(“Please enter a value greater than absolute zero”)
else:
C = (T-32)*(5/9)
K = C+273.15
print(“Celsius is “, round(C,2))
print(“Kelvin is “, round(K,2))
exit()
the error is on line 1, I forgot to include that
3 Answers
- Anonymous2 years ago
it's back to learning it all over again.
- Robert JLv 72 years ago
All the quotation marks you are using appear to be non-ASCII characters.
Yours are
‘
’
“
Should be
'
"
Make sure you are using a plain text editor, not a "word processor" type program.