Question #277374

Please answer all this questions.

In python

  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.

Expert's answer

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()
LATEST TUTORIALS
APPROVED BY CLIENTS