Referenced from lesson Solving Word Problems (Spring, 2021)

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

Contract Examples

examples: match(1.5) is "greater than 1" end

1

examples: match(24) is star(24 * 2, "outline", "purple") end

2

examples: match(string-length("tabletop")) is "8" end

3

A

# match :: Number -> String

examples: match(star(20, "outline", "red"), 3) is 3 * image-height(star(20, "outline", "red")) end

4

B

# match :: Number -> Image

examples: match(circle(10, "solid", "silver"), 16) is 16 * image-height(circle(10, "solid", "silver")) end

5

C

# match :: Number, Number -> Number

examples: match("triangle", "blue") is triangle(40, "outline", "blue") end

6

D

# match :: String, String -> Image

examples: match(30) is star(30 * 2, "outline", "purple") end

7

E

# match :: Images, Number -> Number

examples: match(string-length("coffee"), string-length("tea")) is 6 + 3 end

8

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). CCbadge Bootstrap:Algebra 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.