Part A

Here are two Circles of Evaluation and their corresponding code. One of them is familiar, but the other is very different from what we’ve been working with.

(​* 10 -4)

(text "Good work!" 50 "red")

Code: 10 * -4

Code: text​(​"Good work!", 50, "red"​)

1 Focus on the Circles of Evaluation. What do you Notice is different about the one on the right?

2 What do you Wonder about the Circle of Evaluation on the Right?

3 Focus on the Code. What do you Notice is different about the code on the right?

4 Can you figure out the Name for the function in the second Circle of Evaluation?

5 What do you think this expression will evaluate to?

Part B

6 Test the code out in code.pyret.org (CPO)!

7 What does the 50 mean to the computer? Try replacing it with different values, and see what you get.

8 What does the "red" mean to the computer? Try replacing it with different values, and see what you get.

Here is another Circle of Evaluation to explore.

(string-length "fun!")

9 Convert this Circle of Evaluation to code:

10 What do you think this expression will evaluate to?

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.