4 Functions [10 marks]

Environment Canada describes how to compute a value called the wind chill. The wind chill is an index that indicates how cold the weather feels to the average person when there is some wind. For example, if the air temperature is -5 degrees Celcius and the wind chill is -15 then it means that it feels similar to a windless day where the temperature is -15 degrees Celcius. The formula for computing wind chill \(W\) when the air temperature \(T\) is 0 degrees or less and the wind speed \(V\) is 5 km/h or greater is:

\[ W = 13.12 + 0.6215T + (0.3965T - 11.37)V^{0.16} \]

Create a function that computes the wind chill value. Your function should satisfy the following constraints:

  1. it should be named windchill
  2. it should return one value W (the wind chill value)
  3. it should have two input values T and V (the air temperature in degrees Celcius and the wind velocity in km/h)

The wind chill value is always less than the air temperature.

4.1 Example usage

The exact value of wc in the example below is not given to you, but it is between -7 and -3:

airTemp = -1.5;
windSpeed = 12;
wc = windchill(airTemp, windSpeed)