Add the racket file used in the second lab. Add content to second lab post

This commit is contained in:
Isaac 2022-09-12 10:15:00 -03:00
parent fa241c6b88
commit f0d6812187
2 changed files with 24 additions and 0 deletions

22
L02/hello.rkt Normal file
View 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
View File

@ -0,0 +1,2 @@
#lang racket
(displayln "hello world")