条件语句,while循环语句:完整的温度转换程序
while True:
a=input('1:摄氏温度\n2:华氏温度\n3:退出\n')
if a=='':
c=float(input('请输入摄氏温度'))
f=(c*9/5)+32
print('{:.2f}摄氏温度转换华氏温度{:.2f}'.format(c,f))
elif a=='':
f=float(input('请输入华氏温度'))
c=5/9*(f-32)
print('{:.2f}华氏温度转换摄氏温度:{:.2f}'.format(f,c))
else:
break;