`![
格式要求
](https://img-blog.csdnimg.cn/20210526233601132.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80Njg4MDk0OQ==,size_16,color_FFFFFF,t_70#pic_center)
tempstr=input("")
if tempstr[-1] in [‘F’,‘f’]:
C=(eval(tempstr[0:-1])-32)/1.8
print("{:.2f}C".format©)
elif tempstr[-1] in [‘C’,‘c’]:
F=1.8eval(tempstr[0:-1])+32
print("{:.2f}F".format(F))
else:
print(“输入格式错误”)`*