;;;; 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, this time using claims (= (final-grade 0 0) 0) (= (final-grade 100 100) 100) (= (final-grade 0 100) 65) (= (final-grade 100 0) 35)