Question

Python3 Wind chill on a windy day, a temperature of 15 degrees may feel colder, perhaps...

Python3

Wind chill on a windy day, a temperature of 15 degrees may feel colder, perhaps it may feel like 7 degrees.

The formula below calculates the "wind chill", indicating the temperature that is felt based on the actual temperature (t, in Fahrenheit) and wind speed (v, in miles per hour):

w = 35.74 + 0.6215 t + (0.4275 t - 35.75) (v 0.16)

Write a function windChill that takes two input arguments (t and v) and returns the wind chill value, rounded up to the closest integer value.

Note: The formula is not valid if t is larger than 50 in absolute value or if v is larger than 120 or less than 3. You may assume that the values we will test for are in that range.

Here’s an example of a possible sample run:

>>> print(windChill(20,15))
6

For example:

Test Result
print(windChill(20,15))
6
print(windChill(50,15))
45
0 0
Add a comment Improve this question Transcribed image text
Answer #1
def windChill(t, v):
    return round(35.74 + 0.6215 * t + (0.4275 * t - 35.75) * (v ** 0.16))


# Testing the function here. ignore/remove the code below if not required
print(windChill(20, 15))
print(windChill(50, 15))

Add a comment
Know the answer?
Add Answer to:
Python3 Wind chill on a windy day, a temperature of 15 degrees may feel colder, perhaps...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • This is for Python3. Why do the answers to these two conditions differ? thank you very...

    This is for Python3. Why do the answers to these two conditions differ? thank you very much! Wind chill on a windy day, a temperature of 15 degrees may feel colder, perhaps it may feel like 7 degrees The formula below calculates the "wind chill", indicating the temperature that is felt based on the actual temperature (t, in Fahrenheit) and wind speed (v, in miles per hour): - 35.74+0.6215t+(0.4275 t-35.75) (v16 Write a function windChill that takes two input arguments...

  • Need to use Python string formatting to align wind-chill values in equal-sized columns Using your knowledge...

    Need to use Python string formatting to align wind-chill values in equal-sized columns 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 O to 50 in 5 mph increments Columns represent temperatures from -20 to +60 in 10-degree increments Your program should include a function that returns windchill for a given combination of wind speed & temperature, using this formula from...

  • The formula for wind chill C (in ees Fahrenheit) is given by C-35.74 0.6215T- 35.75v0.16 + 0.42750.16 where v is the wind speed in miles per hour and T is the temperature in degrees Fahrenheit. The w...

    The formula for wind chill C (in ees Fahrenheit) is given by C-35.74 0.6215T- 35.75v0.16 + 0.42750.16 where v is the wind speed in miles per hour and T is the temperature in degrees Fahrenheit. The wind speed is 27 ± 3 miles per hour and the temperature is 8 1. Use dC to estimate the maximum possible propagated error (round your answer to four decimal places) and relative error in calculating the wind chill (round your answer to two...

  • In C++ Code and Algorithm Please Thanks:) During winter when it is very cold, typically, everyone...

    In C++ Code and Algorithm Please Thanks:) During winter when it is very cold, typically, everyone would like to know the windchill factor, especially, before going out. Meteorologists use the following formula to compute the windchill factor, W: Your program must contain at least two functions: one to get the user input and the other to determine the windchill factor. The main function is not considered to be one of two functions. That function is always included. Also, the functions...

  • Part​ ​A Write a function windChillCalculator ​to determine the wind chill. Your main function should take...

    Part​ ​A Write a function windChillCalculator ​to determine the wind chill. Your main function should take in user inputs for T (air temperature) and V (wind speed) and pass these values as parameters to your function. After your function calculates the wind chill it should return​ it to main. To test your code, for T = 30.0 and V = 5.0, you should get a Wind Chill of 24.7268. Within your main function, print the following cout statement: cout <<...

  • Write a multi-file program for a meteorologist that calculates the wind chill factor and cloud base...

    Write a multi-file program for a meteorologist that calculates the wind chill factor and cloud base altitude for the inputs temperature in Fahrenheit, wind speed in mph, and the dew point in Fahrenheit. Allow the user to run the program multiple times without having to restart the program and clear the console window between sessions using system (“CLS”) which requires the cstdlib library. The program must have the following four (4) functions called from main and located in a header...

  • Lesson If you have been outside on a cold windy day, you have experien emperature that...

    Lesson If you have been outside on a cold windy day, you have experien emperature that our bodies feel when the wind blows on our skin on a com wind chill, the temperature seems to our bod dangerous. Meteorologists predict the temp outside. For example, people need to know the displays wind chills for various windsds when the outside temperature is 15 ve experienced wind chill Windchill is the our skin on a cold day. When we experience to our...

  • Wind Chill 50 45 40 35 30 Wind Speed (km/h) 25 20 15 10 5 0...

    Wind Chill 50 45 40 35 30 Wind Speed (km/h) 25 20 15 10 5 0 in -10 -15 -20 35 40 -45 -50 Air Temperature (°C) Task: The wind chill index measures the sensation of cold on the human skin. In October 2001, Environment Canada introduced the wind chill index above. Each curve represents the combination of air temperature and wind speed that would produce the given wind chill value. For example, a temperature of -25°C and wind speed...

  • *****THIS IS FOR MY PYTHON CLASS. PLEASE HELP***** { "cells": [ { "cell_type": "markdown", "metadata": {},...

    *****THIS IS FOR MY PYTHON CLASS. PLEASE HELP***** { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "#### CS 497 Lab 1\n", "\n", "\n", "### Instructions\n", "0. Rename this file username_lab1. **Not literally, yourName_lab1 (technically correct, the best kind of correct!) but use your BU ID to fill in yourName.** If I was submitting this lab, it would be called dbrennan_lab1.\n", "1. Read all instructions carefully, ask questions if anything is confusing. \n", "2. Fill in the code/text blocks...

  • In this assignment you will be implementing a weather forecaster. It involves writing 3 different classes...

    In this assignment you will be implementing a weather forecaster. It involves writing 3 different classes plus a driver program. It is recommended that you write one class at a time and then write a driver (tester) program to ensure that it works before putting everything together. Alternately, you can use the Interactions tab of JGRASP to test some of the early classes. This is discussed in the next few pages. The Season Class The first, shortest, and easiest class...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT