Add the racket file used in the second lab. Add content to second lab post
This commit is contained in:
parent
fa241c6b88
commit
f0d6812187
22
L02/hello.rkt
Normal file
22
L02/hello.rkt
Normal file
@ -0,0 +1,22 @@
|
||||
#lang slideshow
|
||||
(define c (circle 10))
|
||||
(define r (rectangle 10 20))
|
||||
|
||||
(define (square n)
|
||||
(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)))
|
2
L02/hello.rkt~
Normal file
2
L02/hello.rkt~
Normal file
@ -0,0 +1,2 @@
|
||||
#lang racket
|
||||
(displayln "hello world")
|
Loading…
Reference in New Issue
Block a user