;;;; This example illustrates the use of the design recipe for ;;;; functions consuming simple (atomic) data. ;; (Step 2) Contract/purpose/header ;; final-grade : Number Number -> Number ;; computes final grade based on hw and exam scores ;; (define (final-grade hw exams) ...) ;; (Step 5) Body (define (final-grade hw exams) (+ (* .35 hw) (* .65 exams))) ;; (Step 3) Examples and (Step 6) Tests (final-grade 0 0) "should be" 0 (final-grade 100 100) "should be" 100 (final-grade 0 100) "should be" 65 (final-grade 100 0) "should be" 35