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 11.3.3) (read-case-sensitive #t) (teachpacks ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp")))))
4 ;;Produces an intenger between n and m-1
6 ;; random-n-m : integer integer -> integer
7 ;; ...
8 ;; Assume: n < m
9 (define (random-n-m n m)
10 (+ (random (- m n)) n))
12 create-temps : number number number -> list-of-numbers
13 Creates a list-of-numbers consisting of n numbers between low and high.
14 Example
15 (create-temps 0 low high)
16 empty
17 (create-temps 1 low high)
18 (random-n-m low (+ high 1))
20 (define (create-temps n low high)
21 (cond
22 []
23 []))
25 (
27 (define