作业相关
学习教程
总 结
网  络 大数据 编  程
链 接
表扬栏

返回主页   后退
#tempconvert.py
tempstr=input("请输入带有符号的温度值:")
if tempstr[-1] in ['f','F']:
C=(eval(tempstr[0:-1])-32)/1.8
print("轮换后的温度是{:.2f}C".format(C))
elif tempstr[-1] in ['c','C']:
F=1.8*eval(tempstr[0:-1])+32
print("轮换后的温度是{:.2f}F".format(F))
else:
print("输入格式有误")

EditRegion1

2025促销:香港特价空间,最低仅需20元,可永久使用!
本站空间由 三维免费空间 友情提供