更新
This commit is contained in:
14
Python-100-Days/Day01-15/Day02/centigrade.py
Normal file
14
Python-100-Days/Day01-15/Day02/centigrade.py
Normal file
@@ -0,0 +1,14 @@
|
||||
"""
|
||||
|
||||
将华氏温度转换为摄氏温度
|
||||
F = 1.8C + 32
|
||||
|
||||
Version: 0.1
|
||||
Author: 骆昊
|
||||
Date: 2018-02-27
|
||||
|
||||
"""
|
||||
|
||||
f = float(input('请输入华氏温度: '))
|
||||
c = (f - 32) / 1.8
|
||||
print('%.1f华氏度 = %.1f摄氏度' % (f, c))
|
||||
Reference in New Issue
Block a user