Files
30-seconds-of-code/snippets/celsius_to_fahrenheit.md
Isabelle Viktoria Maciohsek a2cd6db3b0 Update snippet descriptions
2020-11-02 19:27:07 +02:00

18 lines
285 B
Markdown

---
title: celsius_to_fahrenheit
tags: math,beginner
---
Converts Celsius to Fahrenheit.
- Follow the conversion formula `F = 1.8 * C + 32`.
```py
def celsius_to_fahrenheit(degrees):
return ((degrees * 1.8) + 32)
```
```py
celsius_to_fahrenheit(180) # 356.0
```