On this page:
4.1 Image To Code Kata
4.2 House Kata
4.3 Tree Kata

4 Day 4 – Making Pictures

REVIEW Beside, above, and overlay

4.1 Image To Code Kata

read
Write the simplest code possible to make this shape:
image
(Note: This shape is 49 pixels wide and 46 pixels tall)
code
#lang racket
(require 2htdp/image)
 
(star 30 'solid 'gold)

4.2 House Kata

read
Write code that produces an image of an aqua/blue house.
code
#lang racket
(require 2htdp/image)
 
(above
  (triangle 100 'solid 'aqua)
  (square 100 'solid 'blue))

4.3 Tree Kata

read
Write code that produces an image of a green/brown tree.
code
#lang racket
(require 2htdp/image)
 
(above
  (circle 30 'solid 'green)
  (rectangle 20 80 'solid 'brown))