Referenced from lesson Solving Word Problems (Spring, 2021)
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.
1
examples:
mystery(triangle(70, "solid", "green")) is
triangle(140, "solid", "green")
mystery(circle(100, "solid", "blue")) is
circle(200, "solid", "blue")
end
2
examples:
mystery("red") is
triangle(140, "solid", "red")
mystery("blue", "circle") is
circle(140, "solid", "blue")
end
3
examples:
mystery("+", 4, 5) is 4 + 5
mystery("sqrt", 25) is num-sqrt(25)
end
4
examples:
mystery("circle", 4) is pi * num-sqr(4)
mystery("square", 5) is num-sqr(5)
end
5
examples:
mystery("dog") is 3
mystery("cat") is "kitten"
end
6
examples:
mystery("dog") is 3
mystery("kitten") is 6
end
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). 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.