Question: Racket Code I need help completing this racket code. What I have currently is a code that creates a checkerboard but its all squares that

Racket Code I need help completing this racket code. What I have currently is a code that creates a checkerboard but its all squares that are red and black. Now what I want is a checkerboard but its circles that are red and black rather than squares. See bottom of the question for how I want the output to be Code: #lang slideshow

(define c (circle 10)) (define r (rectangle 10 20)) (define (square n) ; A semi-colon starts a line comment. ; The expression below is the function body. (filled-rectangle n n))

(define (four p) (define two-p (hc-append p p)) (vc-append two-p two-p))

(define (checker p1 p2) (let ([p12 (hc-append p1 p2)] [p21 (hc-append p2 p1)]) (vc-append p12 p21)))

(define (checkerboard p) (let* ([rp (colorize p "red")] [bp (colorize p "black")] [c (checker rp bp)] [c4 (four c)]) (four c4)))

////// How the output should be: Racket Code I need help completing this racket code. What I have

Welcome to DrRacket, version 7.6 [3m). Language: slideshow, with debugging, memory limit: 128 MB. > (checkerboard (filled-circle 20)) >|

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!