I am trying to write a python function that converts between celsius and farenheit and subsequently a program that first prompts for the temp scale (c or f) and then the temp value and then converts to the other. What I have so far:
def convert_temp( source_temp, scale):
if scale == 'c':
return(tmp-32.0)*(5.0/9.0)
elif scale == 'f':
return(tmp*(9.0/5/0))+32
source_temp = int(input)'Key in temp:'))
scale = input('(c) or (f)?')
y = conv(source_temp,scale)
print(tmp, 'in ',scale,"='s",y)
however, when I try to run the program, I receive a lot of traceback and syntax errors. What am I doing wrong??