Blame


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 3.3.5) (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 ;; velocity : number number -> number
5 12687dd9 2023-08-04 jrmu ;; Computes the velocity at time given the acceleration constant g
6 12687dd9 2023-08-04 jrmu
7 12687dd9 2023-08-04 jrmu (define (velocity time g)
8 12687dd9 2023-08-04 jrmu (* time g))
9 12687dd9 2023-08-04 jrmu
10 12687dd9 2023-08-04 jrmu ;; height : number number -> number
11 12687dd9 2023-08-04 jrmu ;; Consumes the parameters time and g.
12 12687dd9 2023-08-04 jrmu ;; Computes the height at time t given the velocity and the time by multiplying the two and dividing by two.
13 12687dd9 2023-08-04 jrmu
14 12687dd9 2023-08-04 jrmu (define (height time g)
15 12687dd9 2023-08-04 jrmu (* 0.5 (velocity time g) time))