18 lines
328 B
Markdown
18 lines
328 B
Markdown
---
|
|
title: fahrenheit_to_celsius
|
|
tags: math,beginner
|
|
---
|
|
|
|
Converts Fahrenheit to Celsius.
|
|
|
|
Use the formula `celsius = (fahrenheit - 32) / 1.8` to convert from Fahrenheit to Celsius.
|
|
|
|
```py
|
|
def fahrenheit_to_celsius(fahrenheit):
|
|
return ((fahrenheit - 32) / 1.8)
|
|
```
|
|
|
|
```py
|
|
fahrenheit_to_celsius(77) # 25.0
|
|
```
|