try: A=input() if A [-1] in ['c','C']: f=1.8*eval(A[0:-1])+32 print("{:.2f}F".format(f)) elif A [-1] in ['f','F']: c=(eval(A[0:-1])-32)/1.8 print("{:.2f}C".format(c)) else: print("输入错误,末位只能是'C','c','F','f'") except NameError : print("试图访问的变量名不存在") except SyntaxError: print('存在语法错误')