Write a Python program to calculate wind chill index


The program calculates the wind chill index using the temperature and wind speed entered by the user. The wind chill index is an estimate of how cold the air feels to the human body, taking into account the cooling effect of the wind on the skin.

The program starts by importing the math module, which provides access to mathematical functions such as exponentiation. It then prompts the user to enter the wind speed in kilometers per hour and the temperature in degrees Celsius using the input() function.

The program calculates the wind chill index using the formula:.

13.12 + 0.6215*t - 11.37*v**0.16 + 0.3965*t*v**0.16

where t is the temperature in degrees Celsius and v is the wind speed in kilometers per hour. The formula involves several mathematical operations, including raising a number to a power using the math.pow() function, and multiplication and addition.

The calculated wind chill index is then rounded to the nearest integer using the round() function, and the result is printed to the console using the print() function. The output message includes the calculated wind chill index value along with a descriptive string.

Overall, the program provides a quick and easy way to estimate the wind chill index for a given combination of temperature and wind speed, which can be useful in planning outdoor activities or assessing potential health risks due to exposure to cold weather.

Source Code

import math
v = float(input("Enter the wind Speed in kilometers/hour : "))
t = float(input("Enter the Temperature in Degrees Celsius : "))
ans = 13.12 + 0.6215*t -  11.37*math.pow(v, 0.16) + 0.3965*t*math.pow(v, 0.16)
res = round(ans, 0)
print("The wind chill index is", res)

Output

Enter the wind Speed in kilometers/hour : 21.3
Enter the Temperature in Degrees Celsius : 34.5
The wind chill index is 38.0

Example Programs