18 lines
324 B
Markdown
18 lines
324 B
Markdown
---
|
|
title: celsius_to_fahrenheit
|
|
tags: math,beginner
|
|
---
|
|
|
|
Converts Celsius to Fahrenheit.
|
|
|
|
Use the formula `fahrenheit = (celsius * 1.8) + 32` to convert from Celsius to Fahrenheit.
|
|
|
|
```py
|
|
def celsius_to_fahrenheit(celsius):
|
|
return ((celsius * 1.8) + 32)
|
|
```
|
|
|
|
```py
|
|
celsius_to_fahrenheit(180) # 356.0
|
|
```
|