Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Kelvin to Fahrenheit
#1
My first python script that I wrote entirely on my own. Celsius to Fahrenheit, and Fahrenheit to Celsius have been done a billion times, so I tried to be a bit more creative.

Code:
print "Kelvin to Fahrenheit Converter by Bradley\n\n"
Kelvin = float(raw_input("Enter Kelvin:  "))
Celsius = Kelvin - 273.15
Fahrenheit = Celsius * 1.8 + 32
print
print Fahrenheit
raw_input("")

So, the sun is roughly 5,000 degrees kelvin. Exactly 8.540.6 degrees Fahrenheit.
The average temperature where I live right now is around ~303 Kelvin.

I checked the program with an online converter and it was exact.
Reply


Messages In This Thread
Kelvin to Fahrenheit - by Apache - 05-29-2010, 06:20 PM
RE: Kelvin to Fahrenheit - by uber1337 - 05-30-2010, 06:36 AM
RE: Kelvin to Fahrenheit - by Apache - 05-30-2010, 08:23 AM
RE: Kelvin to Fahrenheit - by alfonzo1955 - 05-30-2010, 10:13 AM
RE: Kelvin to Fahrenheit - by Apache - 05-30-2010, 01:03 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)