Jan-31-2018, 06:52 AM
I am getting Name Error every time I am trying to execute a program.
My code and everything is right though.
Name Error: Name 'b' is not defined
My code and everything is right though.
Name Error: Name 'b' is not defined
def celsius_to_fahrenheit(temp): newTemp = (9/5)* temp +32 print("The Celsius temperature",temp,"is equivalent to",newTemp,end='') print("degress Fahrenheit")output:
def celsius_to_fahrenheit(temp): newTemp = (9/5)* temp +32 print("The Celsius temperature",temp,"is equivalent to",newTemp,end='') print("degress Fahrenheit") Traceback (most recent call last): File "<ipython-input-26-af066734c724>", line 4, in <module> print("The Celsius temperature",temp,"is equivalent to",newTemp,end='') NameError: name 'temp' is not defined