The table below represents four pets at an animal shelter:
pets-table
name | sex | age | pounds |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 Match each Lookup Question (left) to the code that will give the answer (right).
“How much does Maple weigh?” |
1 |
A |
|
|
“Which is the last row in the table? |
2 |
B |
|
|
“What is Fritz’s sex?” |
3 |
C |
|
|
“What’s the third animal’s name?” |
4 |
D |
|
|
“How much does Nori weigh?” |
5 |
E |
|
|
“How old is Maple?” |
6 |
F |
|
|
“What is Toggle’s sex?” |
7 |
G |
|
|
“What is the first row in the table?” |
8 |
H |
|
2 Write the Pyret code that will produce each value on the right.
a. |
pets-table.row-n(3)["name"] |
|
b. |
|
|
c. |
|
|
d. |
|
|
e. |
|
|
These materials were developed partly through support of the National Science Foundation,
(awards 1042210, 1535276, 1648684, and 1738598).
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.