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

<p>The National Weather Service computes the windchill index using the following

ID: 3632266 • Letter: #

Question

<p>The National Weather Service computes the windchill index using the following formula: 35.74+0.6215T-35.75(V<sup>0.16</sup>)+0.4275T(V<sup>0.16</sup>).</p>
<p>Where T is the temperature in degrees Fahrenheit, and V is the wind speed in miles per hour.</p>
<p>Write a program that prints a nicely formatted table of windcill values. Rows should represent wind speed for 0 to 50 in 5 mph increments, and the columns represent temperatures from -20 to +60 in 10-degree increments. Note: the formula only applies for wind speeds in excess of 3 miles per hour.</p>

Explanation / Answer

Then you create two lists with the values in windspeeds and temperatures. To do this you can use the range-function in a list-comprehension. This function takes three values: start, stop and step. The range function is non-inclusive, so you have to give it a stop value that's one step higher than what you want.

windspeeds = [x for x in range(0, 55, 5)

This code computes 0, 5, 10 ... 45, 50
Do the same for temperatures.

Now, the "tricky" part that you don't know how to do: printing the table. This is all about string formatting. You can read up on it here:http://docs.python.org/library/stdty...ing-operations

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote