Question One.
What are the three parts of a contract? (Pick THREE)
A. Name
B. Image
C. Domain
D. Purpose Statement
E. Range
Question Two.
What kind of triangle does the triangle function produce?
A. Acute
B. Equilateral
C. Scalene
D. Isosceles
Question Three.
There are lots of other triangles, and Pyret has a lot of other functions that make triangles.
Triangle :: (Size :: Number, Style :: String, Color :: String) -> Image
Why do you think triangle needs ONE number, while Right-Triangle and Isosceles-Triangle need TWO? And Sans-Triangle needs THREE?
1 answer
A. Triangle needs one number because it is the size of the triangle, which is the same for all types of triangles. Right-Triangle and Isosceles-Triangle need two numbers because they require two different measurements to create the triangle. Sans-Triangle needs three numbers because it requires three different measurements to create the triangle.