Dr. Racket Homework:

Please submit these all in one file. These should all be functions that are no more than a few lines.

Simple function definitions


1.Write a function Celsius->Kelvin which takes in a number of degrees Celsius and returns the corresponding temperature in Kelvin. (Kelvin degrees are the same size as Celsius degrees, but 0 Kelvin is approximately -273.15 Celsius.)


2.Write a function Fahrenheit->Celsius which takes in a number of degrees Fahrenheit and returns the corresponding temperature in Celsius. (The formula is C = (F-32) * 5/9.)


3.Write a function Fahrenheit->Kelvin which does what it sounds like.

Hint: you should be able to write this function with no numbers or arithmetic operators in the function body, by re-using previously-written functions.


 

credited to : Dr. Stephen Bloch