Files
30-seconds-of-code/python/snippets/fahrenheit-to-celsius.md
2023-05-01 22:43:50 +03:00

352 B

title, type, tags, unlisted, cover, dateModified
title type tags unlisted cover dateModified
Fahrenheit to Celsius snippet
math
true last-light 2021-01-04T12:47:04+02:00

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