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

examples: match(1.5) is "greather 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", "red"), 6) is 6 * image-height(circle(10, "solid", "red")) 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 :​: Image, Number -> Number

examples: match(string-length("B"), string-length("AT")) is 1 + 2 end

8

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