Blob


1 ;; The first three lines of this file were inserted by DrScheme. They record metadata
2 ;; about the language level of this file in a form that our tools can easily process.
3 #reader(lib "htdp-beginner-reader.ss" "lang")((modname 4.2.3) (read-case-sensitive #t) (teachpacks ((lib "convert.ss" "teachpack" "htdp"))) (htdp-settings #8(#t constructor repeating-decimal #f #t none #f ((lib "convert.ss" "teachpack" "htdp")))))
4 ;; equation1 : number -> boolean
5 ;; See if n is a solution to 4*n + 2 = 62
7 (define (equation1 n)
8 (= (+ (* 4 n) 2) 62))
10 ;; equation2 : number -> boolean
11 ;; See if n is a solution to 2*n^2 = 102
13 (define (equation2 n)
14 (= (* 2 (sqr n)) 102))
16 ;; equation3 : number -> boolean
17 ;; Test if n is a solution to 4*n^2 + 6*n + 2 = 462
19 (define (equation3 n)
20 (= (+
21 (* 4 (sqr n))
22 (* 6 n)
23 2)
24 462))