Files
30-seconds-of-code/snippets/celsius_to_fahrenheit.md
2021-01-04 12:47:04 +02:00

301 B

title, tags, unlisted
title tags unlisted
celsius_to_fahrenheit math,beginner true

Converts Celsius to Fahrenheit.

  • Follow the conversion formula F = 1.8 * C + 32.
def celsius_to_fahrenheit(degrees):
  return ((degrees * 1.8) + 32)
celsius_to_fahrenheit(180) # 356.0