This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Assignment 1 Sample Solution Winter12 Questi0n1 ;,a
(define mean U 3 (+ U 1 X) U 1 Y) U 1 211)) ;;b
(define a (sqrt (- (+ (sqr b) (sqr CD (* 2 b C (cos d])])] IIC (define gamma (/ 1 (sqrt (- 1 (/ (sqnv) €‘@>(expt 10
1611111)] % Questi0n2 N x: - J
; ; a '-
(define (logit p] (log. D] J < a X ;;b C.
(define (Stirling n\) (* (th (* 2 pi nD (expt (/ n e) n)]) i / (define g 9.8)
(define (height v t] (- (* v t] (* 1/2 g (sqr tDD Questi0n3
(define 0ne-mile-in-kms 1.61) (define one-gallon-in-Ls 3.79] (define (mpg->L/100km mpg]
(/ one-gallon-in-Ls (* (/ 0ne-mile-in-kms 100] mpgD] This document is for the exclusive use of x8wen. Questi0n4 (define participation 5] (define midl-weight .1]
(define mid2-weight .2]
(define final-weight .45]
(define ass-weight .2) (define (final-cslBS-grade mtl mt2 ex assns]
(+ (* mtl midl-weight) (* mt2 mid2-weight) \ ' \
(* ex final-weight] x
(* assns ass-weight) (/ participationD x
(define (final-cs135-e\xd'in=g\§id -needed mtl mt2
assns] (' (/ (- 60 (+ (* mtﬁ miﬁilgveight)
(* mt2 mic 2-weight]
(* assns ask -W/eight)
final-weightD This document is for the exclusive use of x8wen. ...
View Full Document
This note was uploaded on 04/02/2012 for the course CS 135 taught by Professor Vasiga during the Winter '07 term at Waterloo.
- Winter '07