Introduction
In the field of science, temperature is often measured in Celsius or Fahrenheit. Celsius is the metric unit of temperature measurement, while Fahrenheit is the imperial unit of temperature measurement. Sometimes, it is necessary to convert Celsius to Fahrenheit or vice versa. In this challenge, you will be tasked to convert Celsius to Fahrenheit using a conversion formula.
Celsius to Fahrenheit
Write a function celsius_to_fahrenheit that takes a temperature in Celsius as an argument and returns the temperature in Fahrenheit. Use the conversion formula F = 1.8 * C + 32 to convert Celsius to Fahrenheit.
def celsius_to_fahrenheit(degrees):
return ((degrees * 1.8) + 32)
celsius_to_fahrenheit(180) ## 356.0
Summary
In this challenge, you have learned how to convert Celsius to Fahrenheit using a conversion formula. You can now use this knowledge to convert temperatures from Celsius to Fahrenheit in your future projects.