-
For each of three sections below, refer Animals Starter File.
-
In order to follow the directives, you must first create a new column that appears after you select the table.
-
Next, click on the attribute name (
newAttr
) and selectEdit Formula
. -
In order to follow the directives below, you must type text into the "Edit Formula" box.
Task 1: "Hello, my name is"
The shelter wants to put a name tag in front of each animal’s cage so visitors can learn their names. One shelter employee suggests populating all the rows of an entire column with "Hello, my name is" to create enough tags for all of the animals. After printing the tags, shelter employees will write in each animal’s name.
1 Click on newAttr
. Select Edit Formula
. Type Hello, my name is
into the formula box that appears, then select Apply
. What error message appears in all the rows of this column?
2 Click new Attr
again, then select Edit Formula
. This time, type "Hello, my name is"
(with quotation marks!) into the formula box. What happens?
3 Try typing Hello, my name is
with the opening quote, but without the closing quote, and select Apply
. What do you think a "syntax error" is?
4 A string is any value that is entered within .
Task 2: "Hello, my name is Sasha" … "Hello, my name is Snuffles" …
The employee who proposed this solution is happy with it… but you wonder: Wouldn’t it be cool if CODAP could input each animal’s unique name after "Hello, my name is"? Then, you wouldn’t need to handwrite in all those animals' names.
5 Access the formula box again. Try typing in "Hello, my name is Name"
. Did you get the result you want?
6 This time, try typing the "Hello, my name is " + Name
, being sure to leave + Name
out of the string. What happens?
7 Do you get the same result if you use "Hello, my name is " + name
? Does CODAP care about capitalization of attribute names?
8 Now you’re feeling like you can create all kinds of nametags! Edit the formula box to create tags for all of the animals resembling this one: "Hello, my name is Felix. I am a 16 year old cat who weighs 9.2 pounds."
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.