The National Weather Service uses this formula to calculate windchill: 35.74 + 0.6215 x T - 35.75 x V0.16 + 0.4275 x T x V0.16
The National Weather Service uses this formula to calculate windchill:
35.74 + 0.6215 x T - 35.75 x V0.16 + 0.4275 x T x V0.16
Where T = temperature in Fahrenheit and V = wind speed in mph.
Using your knowledge of loops and other Python features covered so far, write a program that prints a table of windchill values, where: - Rows represent wind speed for 0 to 50 in 5 mph increments. - Columns represent temperatures from -20 to +60 in 10-degree increments
You can check your program output against the NWS chart at - http://www.nws.noaa.gov/om/winter/windchill-images/windchill-high_res-w-bw.png (Links to an external site.)
Hint:
the formula only applies for wind speeds > 3 mph
Consider using hard-coded values for T & V to verify your formula before attempting to calculate multiple wind-chill values,
Use a hard-coded value for either T or V, while varying the other input to calculate wind-chill, before attempting to vary both inputs
Don't worry about matching the exact format of the NWS table or making it pretty. Your output can look like this, where first column is wind speed and first row is temperature, and NN is the correct windchill value for that cell:
-20 -10 0 10 20 30 40 50 60 5 NN NN NN NN ... 10 NN NN NN NN ... 15 NN NN NN NN ... 20 NN NN NN NN ...
...
Extra Credit - Use your knowledge of string formatting to align wind-chill values in columns.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started