1 12687dd9 2023-08-04 jrmu ;; The first three lines of this file were inserted by DrScheme. They record metadata
2 12687dd9 2023-08-04 jrmu ;; about the language level of this file in a form that our tools can easily process.
3 12687dd9 2023-08-04 jrmu #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 12687dd9 2023-08-04 jrmu ;; equation1 : number -> boolean
5 12687dd9 2023-08-04 jrmu ;; See if n is a solution to 4*n + 2 = 62
7 12687dd9 2023-08-04 jrmu (define (equation1 n)
8 12687dd9 2023-08-04 jrmu (= (+ (* 4 n) 2) 62))
10 12687dd9 2023-08-04 jrmu ;; equation2 : number -> boolean
11 12687dd9 2023-08-04 jrmu ;; See if n is a solution to 2*n^2 = 102
13 12687dd9 2023-08-04 jrmu (define (equation2 n)
14 12687dd9 2023-08-04 jrmu (= (* 2 (sqr n)) 102))
16 12687dd9 2023-08-04 jrmu ;; equation3 : number -> boolean
17 12687dd9 2023-08-04 jrmu ;; Test if n is a solution to 4*n^2 + 6*n + 2 = 462
19 12687dd9 2023-08-04 jrmu (define (equation3 n)
21 12687dd9 2023-08-04 jrmu (* 4 (sqr n))