fhwhughh

home = C:\Users\teacher\AppData\Local\Programs\Python\Python36-32
include-system-site-packages = false
version = 3.6.5
a=int(input('摄氏温度转为华氏温度请按1\n华氏温度转为摄氏温度请按2\n'))
if a=='1':
    c=input('请输入摄氏温度:')
    f=float(c)*9/5+32
    print('{}摄氏温度转为华氏温度是:{}'.format(c,f))
else:
    f=float(input('请输入华氏温度:'))
    c=5/9*(f-32)
    print('{:.2f}摄氏温度转为华氏温度{:.2f}'.format(f,c))

  

猜你喜欢

转载自www.cnblogs.com/wzbbang/p/8947320.html