Directions: For each pairs of Examples below, decide whether the two examples have the same contract. If they do, fill in the contract in the space provided. If not, write a few words explaining why.
-
; : ->(EXAMPLE (mystery "" 4 5) ( 4 5)) (EXAMPLE (mystery "sqrt" 25)) (sqrt 25))
-
; : ->(EXAMPLE (mystery (triangle 70 "solid" "green")) (triangle 140 "solid" "green")) (EXAMPLE (mystery (circle 100 "solid" "blue")) (circle 200 "solid" "blue"))
-
; : ->(EXAMPLE (mystery "red") (triangle 140 "solid" "red")) (EXAMPLE (mystery "blue" "circle")) (circle 140 "solid" "blue"))
-
; : ->(EXAMPLE (mystery "circle" 4) (* pi (sqr 4))) (EXAMPLE (mystery "square" 5)) (sqr 5))
-
; : ->(EXAMPLE (mystery "dog") 3) (EXAMPLE (mystery "cat") "kitten")
-
; : ->(EXAMPLE (mystery "dog") 3) (EXAMPLE (mystery "kitten") 6)
-
; : ->(EXAMPLE (mystery 4 5 "big") (scale 2 (rectangle 4 5 "solid" "blue"))) (EXAMPLE (mystery 10 "small" 4) (scale .5 (rectangle 10 4 "solid" "blue")))
These materials were developed partly through support of the National Science Foundation,
(awards 1042210, 1535276, 1648684, and 1738598).
BS:Games by Jen Poole, Emmanuel Schanzer, Ed Campos Jr, 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.