Consider shapes-table
below, and the four value definitions that follow.
name | corners | is-round |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
shapeA = row-n(shapes-table, 0)
shapeB = row-n(shapes-table, 1)
shapeC = row-n(shapes-table, 2)
shapeD = row-n(shapes-table, 3)
1 Match each Pyret expression (left) to the description of what it evaluates to (right).
|
1 |
A |
Evaluates to |
|
|
2 |
B |
Evaluates to the last row in the table |
|
|
3 |
C |
Evaluates to |
|
|
4 |
D |
Evaluates to |
|
|
5 |
E |
Evaluates to |
|
|
6 |
F |
Evaluates to |
|
|
7 |
G |
Evaluates to the first row in the table |
2 For each value on the left, write the Pyret expression that will produce that value on the right. The first one has been completed for you.
a. |
|
|
b. |
|
|
c. |
|
|
d. |
|
|
e. |
|
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). Bootstrap 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.