Open the Defining Values Starter File and click "Run".
1 What do you Notice?
2 What do you Wonder?
For each of the expressions listed below, write your prediction for what you expect Pyret to produce? Once you have completed your predictions, test them out one at a time in the Interactions Area.
Prediction | Result | Prediction | Result | |||
---|---|---|---|---|---|---|
3 |
4 |
|||||
5 |
6 |
|||||
7 |
8 |
|||||
9 |
10 |
|||||
11 |
12 |
13 In the code, find the definitions of exampleA
, exampleB
, and exampleC
. These all define the same shape, but their definitions are split across several lines. Suppose you had to split your code across multiple lines like this. Which one of these is the easiest to read, and why?
14 Define at least 2 more variables in the Definitions Area, click "Run" and test them out. Once you know they’re working, record the code you used below.
15 What have you learned about defining values?
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.