Combines actual temperature and wind speed


Assignment:

Q: In the winter. weather reports often refer to the wind-chill factor. a measurement that combines actual temperature and wind speed to estimate the temperature experienced by an exposed human ben If the wind speed is 3 miles per hour or less, then the wind is not considered a factor in the experienal temperature-ix.. the wind chill is the same as the actual temperature. If the wind speed excec..l, l miles per hour. however. meteorologists use a complex formula to compute the wind chill. Assurtam that temperature stores the actual temperature (in degrees Fahrenheit) and windSpeed stores ..tw wind speed (in miles per hour), we can calculate the wind-chill factor using the following formula

                  1temperature if windSpeed -. 3

windChill =     35.74 + 0.6215*temperature +

(0.4275/temperature - 35.751*wind speet 0.16 otherwise

When translated into lavaScript. the formula for calculating wind chill can be written using the lowing if statement:
if (windSpeed <=3) { windChill =temperature;
else

windChill =35.74 + 0.6215*temperature +
(0.4275*temperature - 35.75)*Math.pow(wind5peed. 0.16);
}

Create a Web page named chill.html that computes the wind-chill factor for a given temperature and wind speed. The user should be able to enter a temperature and wind speed via text boxes. then click a button to view the corresponding wind-chill factor in a separate text box.

As part of your page, you should define a function named Wi ndChi 11 that accepts the temperature and wind speed as in¬puts and returns the wind-chill factor.

Once you have completed your page. use it to determine the wind-chill factors for the following weather conditions:
wind = 2 temp - 30
wind = S temp - 18
wind = 12 temp - 45
wind - 30 temp . 10

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Combines actual temperature and wind speed
Reference No:- TGS01938240

Now Priced at $25 (50% Discount)

Recommended (98%)

Rated (4.3/5)