;;; Name: ;;; Date: ;;; CS 200 PS2 (load "election.ss") ;;; Question 0: ;;; Question 1a: ;; (draw-curve-points vertical-mid-line 1000) ;;; Question 1b: ;; (draw-curve-points (vertical-line 0.5) 1000) ;; (draw-curve-points (vertical-line 0.2) 1000) ;;; Question 2a: ;;; (define virginia-electorate ...) ;;; Question 2b: ;;; (define charlottesville-electorate ...) ;;; Question 3: ;;; (define (electorate-voters-worker electorate start-position end-position step) ;;; Question 4: ;;; Question 5: (define (n-times f n) (if (= n 0) (lambda (x) x) ; No procedure applications, ; return the identity procedure ; (compose ; (n-times f )) )) ;;; Question 6: ;;; Define your candidate repositioning procedure here (define cs200-primary (make-race flat-electorate (list (make-candidate "Alyssa P. Hacker" 0.5 static-candidate) (make-candidate "Ben Bitdiddle" 0.4 move-away-from-others) (make-candidate "Cy D. Fect" 0.9 move-away-from-others) ; add your candidate here: ; (make-candidate "YOUR NAME" initial-position repositioning-procedure) )))