Function Exercises
| categories: Practice
Today in lab I'll answer questions and then you'll work with functions. These are best done in a script. There is nothing to turn in and no grade will be assigned. Of course you may ask any questions.
- Write a function
FtoC(t)that converts temperature in Fahrenheit to Celsius. - Write a function
CtoF(t)that goes back from Celsius to Fahrenheit. - Write a function to compute the Dew Point given the temperature in Celsius and the relative humidity. I suggest you start with the simple approximation and only then try the Magnus formula if you're feeling extra bold.
- Now, using the functions you've written above, write one more function to compute the Dew Point in Fahrenheit given the temperature in F and the relative humidity.