print "Calculate wind chill temperature in Fahrenheit."'\n' def Windchill(): T = float(input("Enter the temperature in Fahrenheit."'\n')) print "You entered ",T, "degrees"'\n' V = float(input("Enter the wind speed."'\n')) print "You entered ",V, "MPH."'\n' windchill = 35.74 + (0.6215*T) - 35.75*(V**0.16) + 0.4275*T*(V**0.16) if windchill <= -0: print("It's %g degrees with the wind chill... DANGEROUS!" % round(windchill, 2,)) elif windchill > -1 and windchill < 50: print("It's %s degrees with the wind chill." % round(windchill, 2,)) elif windchill > 50 and windchill < 110: print("It's %s... too warm, why are you worried about it?" % round(windchill, 2,)) elif windchill > 110: print("You must be on the sun!") Windchill()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question