Thursday, March 17, 2016

Fahrenheit To Celsius Converter Using Functions in Python

A program that I wrote using Python as my programming language that will ask the user to give a temperature value in Fahrenheit and then it will convert it to Celsius equivalent using functions in Python.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.



Sample Program Output


Program Listing

print("");
print("Fahrenheit To Celsius Converter");
print("");
fahrenheit = input("Enter temperature in Fahrenheit : ")
temp = int(fahrenheit)

def find_celsius(temp):   
    return (float(temp)-32) * 5.0/9.0

print("");

get_result = find_celsius(temp)
final_result = int((get_result * 100) + 0.5) /100.0

print("The temperature ", temp, " in Fahrenheit "
      ,final_result,' in Celsius.')
print("");
print("End of Program")
print("");





No comments:

Post a Comment