Created
February 1, 2017 03:17
-
-
Save shamikalashawn/ffc29032e455f4ba01d0c4c43e99a1c5 to your computer and use it in GitHub Desktop.
Give me the temperature in Celsius and I'll give it to you straight, in Fahrenheit. And vice versa.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fahrenheit_to_Celsius(): | |
fahrenheit = float(input('Please enter the temperature in Fahrenheit: ')) | |
celsius = (5/9.0) * (fahrenheit - 32) | |
print('{:.2} degrees Fahrenheit is {:.2} degrees Celsius.'.format(str(fahrenheit), str(celsius))) | |
def celsius_to_Fahrenheit(): | |
celsius = float(input('Please enter the temperature in Celsius: ')) | |
fahrenheit = 32 + (celsius * (9/5.0)) | |
print('{:.2} degrees Celsius is {:.2} degrees Fahrenheit.'.format(str(celsius), str(fahrenheit))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment