Make sure you’ve opened your saved copy of the Row Functions Starter File. The Definitions Area will contain sample Rows such as lizard-row
, old-row
, etc.
The code below draws a solid, green triangle, using 5x the age of old-row
as the size:
triangle((5 * old-row["age"]), "solid", "green")
For each of the prompts below write the code on the blank lines that will produce the desired result. The first one has been done for you.
1 An animal is "old" if it is greater than 10 years old. Is lizard-row
old?
lizard-row["age"] > 10
2 An animal is "young" if it is less than 1 year old. Is female-row
young?
3 Using male-row
, draw a solid, blue circle where the radius is the age
of the row.
4 If every week is 7 days, how many days did it take for our rabbit-row
to be adopted?
5 If every 2.2 pounds is 1 kilogram, how many kilograms does our rabbit-row
weigh?
6 Is the species of our fixed-row
animal a "dog"
?
7 Is the species of our young-row
animal a "cat"
?
8 Using male-row
, draw the species of the animal in red, 15px letters.
9 Is lizard-row
fixed?
10 If a year has 52 weeks, how many years did it take unfixed-row
to be adopted?
11 Does old-row
have an "s" in its name?
12 Using any Row you like, draw the name
of the animal in red letters and use the pounds
of the animal for the font size.
★ Draw a solid pink star, using the age of dog-row
as the radius. Rotate it by the number of pounds it weighs.
★ ★ Get creative. Choose one defined Row and think of as many ways as you can to use its columns!
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.