The table t below represents three 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

Create a Transformer card that responds to the given prompt on the left. When you’re done, give the Transformer a useful name. We’ve done the first one to get you started.

Prompt Transformer Card Name & Purpose Statement

1

Create a Transformer that produces a Table containing all animals younger than 5.

Type: filter[filter/build/transform]

Dataset: t

Expression: age<5

filter-if-young

Checks the row to see whether age is less than 5.

2

Create a Transformer that produces a Table showing all fixed animals.

Type: [filter/build/transform]

Dataset:

Expression:

3

Create a Transformer that produces a Table with a new column ("age next year") that adds 1 year to each age.

Type: [filter/build/transform]

Dataset:

Name of New Attribute:

Expression:

4

Create a Transformer that produces a Table that transforms pounds to kilos (divide by 2.205) but does not add a new column.

Type: [filter/build/transform]

Dataset:

Attribute to Transform:

Name of New Attribute:

Expression:

5

Create a Transformer that produces a Table that doubles pounds but does not add a new column.

Type: [filter/build/transform]

Dataset:

Attribute to Transform:

Name of New Attribute:

Expression:

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.