Consider the table below, and the function definitions that follow:

The table t below represents four animals from the shelter:

name sex age fixed pounds

"Toggle"

"female"

3

true

48

"Fritz"

"male"

4

true

92

"Nori"

"female"

6

true

35.3

"Sasha"

"female"

1

false

6.5

fun is-female(r): r["sex"] == "female" end
fun is-young(r):  r["age"] < 4         end
fun is-fixed(r):  r["fixed"]           end

For each prompt on the left, draw the Circle of Evaluation that will produce the desired table or display.

Prompt Circle of Evaluation

1

Produce a Table containing all young, fixed animals

(filter (filter t is-young) is-fixed)

2

Produce a Table showing all fixed female animals, sorted by age

3

Produce a box-plot for all fixed female animals, showing the distribution of age

4

Produce a pie-chart for all young, fixed animals, showing the distribution of sex

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). CCbadge 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.