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

301 B

title, tags, unlisted
title tags unlisted
fahrenheit_to_celsius math,beginner true

Converts Fahrenheit to Celsius.

  • Follow the conversion formula C = (F - 32) * 5/9.
def fahrenheit_to_celsius(degrees):
  return ((degrees - 32) * 5/9)
fahrenheit_to_celsius(77) # 25.0