Question
Python 3.8.0 homework help

We know a thermometer tells us the ambient temperature. However, we also know that depending on other conditions, like humidi

You now need to test to make sure your function is actually working. To do this we will generate random numbers and send them
0 0
Add a comment Improve this question Transcribed image text
Answer #1

/*******************main.py******************/

import math
import random
def WindChill(speedV,tempT):
windChillIndex = 35.74 + 0.621 * tempT - 35.75 * pow(speedV, 0.16) + 0.427 * tempT * pow(speedV, 0.16)
return windChillIndex
  
print("No.\tTemp(T)\tSpeed(V)\tWindChill")
count = 1;
while(count!=10):
  
tempT = random.randint(-40,40)
speedV = random.randint(3,40)
print(str(count)+"\t"+str(tempT)+"\t"+str(speedV)+"\t"+str(WindChill(speedV,tempT)))
count = count+1

main.py 1 import math 2 import random 3- def Windchill(speedv, tempT): windchillindex = 35.74 + 0.621 * tempt - 35.75 * pow(s

Please let me know if you have any doubt or modify the answer, Thank :)

Add a comment
Know the answer?
Add Answer to:
Python 3.8.0 homework help We know a thermometer tells us the ambient temperature. However, we also...
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
  • 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...

  • Lab Exercise #11 Assignment Overview You will work with a partner on this exercise during your la...

    help with cse problem Lab Exercise #11 Assignment Overview You will work with a partner on this exercise during your lab session. Two people should work at one computer. Occasionally switch the person who is typing. Talk to each other about what you are doing and why so that both of you understand each step Part A: Class Date . Download the files for this laboratory exercise, then run the Python shell and enter the following commands: >>>import date >>help(...

  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

  • In Python! Search Exercise 11.A: Mergesort with a Comparator CS 1410 Background The sort algorithms we...

    In Python! Search Exercise 11.A: Mergesort with a Comparator CS 1410 Background The sort algorithms we have looked at in Module 8 have all sorted list elements in ascending because it compares elements with the less-than operator. For example, in our mergesort program, the comparison appears as follows: 18 L[1] R01 The effect of this comparison is that if L(i) is less than RC), then L[is considered to come before R[i] in the sorted result. Hence the ascending order of...

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
ADVERTISEMENT