온도 변환
섭씨, 화씨, 켈빈 변환.
대표 온도
온도 변환기는 섭씨, 화씨, 켈빈 — 일상생활과 과학 작업에서 가장 많이 접하는 세 가지 온도 척도 — 간에 값을 변환합니다. 섭씨는 대부분의 국가와 과학에서 표준이고, 화씨는 미국에서 날씨와 일상 온도에 사용되며, 켈빈은 0 K가 절대 영도를 나타내는 물리학과 화학에서 사용되는 절대 척도입니다.
세 개의 필드 중 어느 하나에 온도를 입력하면 나머지 두 개가 변환된 값으로 즉시 업데이트됩니다. 사용된 공식은 정확합니다: °C에서 °F는 (°C × 9/5) + 32이고, °C에서 K는 °C + 273.15입니다.
국제 일기예보 읽기, 과학 논문 따르기, 외국 요리법으로 요리하기, 실험실 장비 설정, 또는 역사적·지리적 기후 데이터 이해 시 온도 변환이 필요합니다.
자주 묻는 질문
코드 구현
# Temperature conversion functions
def celsius_to_fahrenheit(c: float) -> float:
return c * 9 / 5 + 32
def fahrenheit_to_celsius(f: float) -> float:
return (f - 32) * 5 / 9
def celsius_to_kelvin(c: float) -> float:
return c + 273.15
def kelvin_to_celsius(k: float) -> float:
return k - 273.15
def fahrenheit_to_kelvin(f: float) -> float:
return (f - 32) * 5 / 9 + 273.15
def kelvin_to_fahrenheit(k: float) -> float:
return (k - 273.15) * 9 / 5 + 32
# Examples
print(celsius_to_fahrenheit(100)) # 212.0 (boiling point)
print(celsius_to_fahrenheit(0)) # 32.0 (freezing point)
print(celsius_to_kelvin(0)) # 273.15 (absolute zero at -273.15°C)
print(fahrenheit_to_celsius(98.6)) # 37.0 (body temperature)Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.