Referenced from lesson Solving Word Problems

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

Contract Examples

(EXAMPLE (match (circle 10 "solid" "green")) (rotate 37 (circle 10 "solid" "green")))

1

A

; match : Number Image -> Image

(EXAMPLE (match (triangle 20 "solid" "blue") 3) (scale 3 (triangle 20 "solid" "blue")))

2

(EXAMPLE (match (circle 20 "outline" "gold")) (rotate 37 (circle 20 "outline" "gold")))

3

B

; match : Image Number -> Image

(EXAMPLE (match 30 "red") (+ 30 (string-length "red")))

4

(EXAMPLE (match (circle 10 "solid" "orange") 22) (scale 22 (circle 10 "solid" "orange")))

5

(EXAMPLE (match 10 "blue") (+ 10 (string-length "blue")))

6

C

; match : Image -> Image

(EXAMPLE (match 5 (star 20 "solid" "red")) (rotate (- 90 5) (star 20 "solid" "red")))

7

(EXAMPLE (match (abs -4) "45") 4)

8

D

; match : Number String -> Number

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). CCbadge Bootstrap:Algebra by Emmanuel Schanzer, Jen Poole, Ed Campos Jr, Flannery Denny, and Dorai Sitaram is licensed under a Creative Commons 4.0 Unported License. Based on a work at www.BootstrapWorld.org. Permissions beyond the scope of this license may be available by contacting schanzer@BootstrapWorld.org.