Answer to Question #277949 in Python for hazard

Question #277949


REQUIREMENTS

The following are the required components of this assignment:

  1. Write a function to calculate and return the wind chill based on a given temperature and wind speed.
  2. Write a function to convert from Celsius to Fahrenheit. The formula for this conversion is to multiply the Celsius temperature by (9/5) and then add 32.
  3. Allow the user to enter the temperature in Celsius of Fahrenheit. If they provide it in Celsius, first convert it to Fahrenheit before using the formula above.
  4. Loop through wind speeds from 5 to 60 miles per hour, incrementing by 5, and calculate and display the wind chill for each of these wind speeds.
  5. Display the wind chill value to 2 decimals of precision.





1
Expert's answer
2021-12-10T07:17:15-0500
def convert2fahrenheit(celsius):
  return (9 / 5) * celsius + 32

def main():
  celsius = int(input('Enter a value for celsius: '))
  print('Celsius:', celsius)
  print('Fahrenheit:', convert2fahrenheit(celsius))
  
if ​__name__=='__main__':
 ​main()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS