We’ve already given you two row definitions: cat-dog and dog-row:

cat-row = row-n(animals-table,  0)  # Sasha is a cat
dog-row = row-n(animals-table, 10)  # Toggle is a dog

Remember: rows start at index zero! Use this to answer the questions below. (HINT: turn to The Animals Dataset and number the data rows first, then answer the questions below.)

1 The index of a row containing a lizard is

2 The index of a row containing a rabbit is

3 The index of a row containing a fixed animal is

4 The index of a row containing a male animal

5 The index of a row containing a female animal is

6 The index of a row containing a hermaphroditic animal is

7 The index of a row containing an unfixed animal is

8 The index of a row containing a young animal (<2 years) is

9 The index of a row containing an old animal (>10 years) is

10 What code would you write to define lizard-row?

11 What code would you write to define rabbit-row?

12 What code would you write to define fixed-row?

13 What code would you write to define male-row?

14 What code would you write to define female-row?

15 What code would you write to define hermaphrodite-row?

16 What code would you write to define young-row?

17 What code would you write to define old-row?

Add this code to your Animals Starter File! You’ll want these rows for later!

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.