The table t
below represents four animals from the shelter:
name | sex | age | fixed | species | pounds |
---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For each of the Circles of Evaluation below, convert them into Pyret code. What do you think the resulting table will be? The first one has been done for you.
Circle of Evaluation | Pyret code | |
---|---|---|
1 |
(sort (build-column t "kg" kilograms) "name" true)
|
|
2 |
(sort (filter t is-fixed) "name" true)
|
|
3 |
(build-column (filter t is-female) "kg" kilograms)
|
|
4 |
(filter (sort t "name" true) is-female)
|
|
5 |
(filter (filter t is-female) is-fixed)
|
Define the functions specified below by filling in the blanks.
6 |
A function |
|
7 |
A function |
|
8 |
A function |
|
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.