Match each Example on the left with its Contract on the right. NOTE: Multiple examples may match to the same Contract!

Contract Examples

(EXAMPLE (match 1.5) "greater than 1")

1

(EXAMPLE (match 24) (star (* 24 2) "outline" "purple"))

2

(EXAMPLE (match (string-length "tabletop")) "8")

3

A

; match :: Number -> String

(EXAMPLE (match (star 20 "outline" "red") 3) (* 3 (image-height (star 20 "outline" "red"))))

4

B

; match :: Number -> Image

(EXAMPLE (match (circle 10 "solid" "silver") 16) (* 16 (image-height (circle 10 "solid" "silver"))))

5

C

; match :: Number, Number -> Number

(EXAMPLE (match "triangle" "blue") (triangle 40 "outline" "blue"))

6

D

; match :: String, String -> Image

(EXAMPLE (match 30) (star (* 30 2) "outline" "purple"))

7

E

; match :: Images, Number -> Number

(EXAMPLE (match (string-length "coffee") (string-length "tea")) (+ 6 3))

8

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). CCbadge Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.