标签:摄氏度 bubuko input 分享 输出 info .com orm form
while True:
a = input(‘摄氏转华氏按1 华氏转摄氏按2‘)
if a == ‘1‘:
#输入
c = input(‘请输入摄氏温度:‘)
#计算
f = float(c)*9/5+32
#输出
print(‘{}摄氏度转华氏度为{}‘ .format(c,f))
elif a==2:
#输入
f = float(input(‘请输入华氏温度:‘))
#计算
c = 5/9*(f-32)
#输出
print(‘{}华氏度转摄氏度为{}‘ .format(c,f))
else:
break

标签:摄氏度 bubuko input 分享 输出 info .com orm form
原文地址:https://www.cnblogs.com/wzbbang/p/8947320.html