;;Exer 2.2.1 from How to Design Programs (define (Fahrenheit->Celsius temp) (* 5 (/ (- temp 32) 9))) The formula here is: Celsius = (Fahrenheit - 32) * (5/9) Load this function into the upper window of DrScheme. Click on the "Run" ("Execute" in Windows) button, upper right. In the lower window (or add these as commands in your program) > (fahrenheitToCelsius 79) 26 1/9
;;Exer 2.2.3 from How to Design Programs (define (triangle base height) ;; Load the function definition in the top (* .5 base height)) ;; window. > (triangle 45 89) ;; After pressing "Run", enter this in the 2002.5 ;; lower window >
> (convert3 5 2 8) 825
> (volume-cylinder 10 24) 7539.816
> (area-cylinder 10 24) 2136.2812000000004
> (area-pipe 10 24 .2) 3046.0856639999997
> (rocket-height 10 60) 18000.0