Ask an Expert
Question

# The National Weather Service computes the wind chill index using the following formula:What do i need to do to define the windChill?

Other
ANSWERED
asked 2021-08-12
So, this is the problem:
The National Weather Service computes the wind chill index using the following formula:
35.74 + 0.6215T – 35.75(V0.16) + 0.4275T(V0.16) Where T is the temperature in degrees Fahrenheit, and V is the wind speed in miles per hour.
Write a program that prints a nicely formatted table of wind chill 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. Create a function for the wind chill with the following specifications: windChill(t, v) Note: this formula only applies for wind speeds in excess of 3 miles per hour.
This is what I have so far:
def windChill(t,v): if < 3
def main():
print("Wind Chill Table")
print("Temperature".center(70))
print ("MPH|",end='')
temps = list(range(-20,61,10))
for t in temps:
print("{0:5}".format(t),end= ' ')
print("\n---+" + 55 * '-')
for vel in range(0,51,5):
print("{0:3}|".format(vel), end=' ')
for temp in temps:
print("{0:5.0f}".format(windChill(temp,vel)), end=' ')
main()
What do i need to do to define the windChill (the main must remain the same)?

## Answers (1)

2021-08-13
if v > 3:
$$\displaystyle{t}={\left({35.74}+{0.6215}\cdot{t}\right)}-{\left({35.75}\cdot{\left({v}\cdot{0.16}\right)}\right)}+{\left({0.4275}\cdot{t}\cdot{\left({v}\cdot{0.16}\right)}\right)}$$
You should have that inside your windChill function and your windChill function should return t. I hope this helps!

expert advice

...