파이썬 섭씨 화씨
-
[Python] Celsius temperature To Fahrenheit's temperature Basic Function (섭씨, 화씨)Python/Python Programming 2020. 11. 22. 10:05
섭씨와 화씨를 계산하는 간단한 함수 # Celsius temperature To Fahrenheit's temperature # 섭씨를 화씨 def c2f(degree): return round((9/5) * degree + 32,2) print(c2f(40)) 104.0 # Fahrenheit's temperature To Celsius temperature # 화씨를 섭씨 def f2c(degree): return round((5/9) * (degree - 32),2) print(f2c(120.0)) 48.89