# Creation of a Function

I am trying to create two functions but I am having trouble. The first consists of converting degrees Fahrenheit to Kelvin using this formula (F - 32)*(5/9) + 273 and another calculates the cricket chirping rate (in s^-1) using Dolbear's law which is Tf=40+N15 where Tf is the temperature in degrees Fahrenheit and N15 is the rate of chirps per minute.

I was able to make the temperature function.

f[F_] = (F - 32)*(5/9) + 273


I am just having trouble with the second function.

Thanks, L

• Probably N15 is the number of chirps produced in 15 seconds (from Wikipedia article), so chirping rate is rate[Tf_] := (Tf - 40)/15. – Alx Sep 11 '19 at 14:12

## 1 Answer

According to the Wikipedia article, the formula is simply number of chirps in 15 seconds plus 40. Don't know why you would need a special function for that, but it would be:

chirpsToTemp[n_]:=n+40


Also, in your original post you really should have a colon before your equals sign

toKelvin[f_]:=((f-32)*(5/9))+273