python中温度转换eval替代float
val=input(‘输入温度带有温度符号温度值:’)if val[-1] in [‘c’,‘C’]:f = eval(val[0:-1])*1.8+32print(‘输出带有温度符号温度值:%.2ff’%f)elif val[-1] in [‘f’,‘F’]:c= (eval(val[0:-1])-32)/1.8print(‘输出结果:%2fc’%c)else:print(‘输入...