Files
30-seconds-of-code/snippets/python/s/fahrenheit-to-celsius.md
Angelos Chalaris 4d0316a062 Update covers
2023-05-07 22:25:00 +03:00

23 lines
366 B
Markdown

---
title: Fahrenheit to Celsius
type: snippet
language: python
tags: [math]
unlisted: true
cover: customs
dateModified: 2021-01-04T12:47:04+02:00
---
Converts Fahrenheit to Celsius.
- Follow the conversion formula `C = (F - 32) * 5 / 9`.
```py
def fahrenheit_to_celsius(degrees):
return ((degrees - 32) * 5 / 9)
```
```py
fahrenheit_to_celsius(77) # 25.0
```