Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(Science: wind-chill temperature) How cold is it outside? The temperature alone

ID: 3883217 • Letter: #

Question

(Science: wind-chill temperature) How cold is it outside? The temperature alone is not enough to provide the answer. Other factors including wind speed, relative humidity, and sunshine play important roles in determining coldness outside. In 2001, the National Weather Service (NWS) implemented the new wind-chill temperature to measure the coldness using temperature and wind speed. The formula is given as follows: twc = 35.74 + 0.6215ta - 35.75 v0.16 + 0.4275 ta v0.16 where ta is the outside temperature measured in degrees Fahrenheit and v is the speed measured in miles per hour. twc is the wind-chill temperature. The formula cannot be used for wind speeds below 2 mph or for temperatures below -58 F or above 41°F. Write a program that prompts the user to enter a temperature between -58 F and 41°F and a wind speed greater than or equal to 2 and displays the wind-chill temperature

Must be done in Python

Explanation / Answer


import math
ta = float(input(' ' "Enter temperature in Farenheit: "))
v = float(input(' ' "Enter Wind speed: "))
if v >= 2:
twc = 35.74 + (0.6215 * ta) - 35.75 * (v ** 0.16) + 0.4275 * ta * (v ** 0.16)
print ' ' "Temperature in degrees Farenheit = ",ta
print ' ' "Wind Speed mile per hour = ",v
print ' ' "Wind Chill Temperature = ",round(twc,0)
else:
print ' ' "The Formula cannot be used"


OUTPUT


Enter temperature in Farenheit:
Enter Wind speed:
Temperature in degrees Farenheit = 40.0
Wind Speed mile per hour = 50.0
Wind Chill Temperature = 26.0


Enter temperature in Farenheit: 41
Enter Wind speed: 1
The Formula cannot be used