Predict

Which equations in the table below will be true when m = 6? What about when m = 12? m = o? With your partner, put a check ✓ in the boxes when you predict the equations will be true. Note: an equation might be true for some values and false for others!

Example m = 6 m = -12 m = 0

1 examples: negate​(​m​) is abs​(​m​) end

2 examples: negate​(​m​) is negate​(​abs​(​m​)​) end

3 examples: negate​(​m​) is abs​(​negate​(​m​)​) end

4 examples: abs​(​negate​(​m​)​) is negate​(​negate​(​m​)​) end

5 examples: abs​(​negate​(​m​)​) is negate​(​abs​(​m​)​) end

Test

6 Open the Negation Starter File (2) and click "Run". Select "Show Details" to the right of examples-block-1. Using the information provided, fill in as many of the blanks as needed below to describe the examples that failed.

Test # failed because the left side was and the right side was .

Test # failed because the left side was and the right side was .

Test # failed because the left side was and the right side was .

7 Talia says that setting m equal to any positive value will produce the same results. In other words, she thinks that the same tests will fail if m > 0? Do you agree? Explain.

8 Edit the definition of m (Section 1 in the starter file) to try out some other positive values. Was your prediction correct? Explain.

9 Change the definition of m so that it equals -12. Click "Run". Which tests failed?

10 Edit the definition of m to test out other negative values. What do you observe?

11 Change the definition of m so that it equals 0. Click "Run". Which tests failed?

Reflect

12 Which equations in the Pyret file are always true?

13 Which equations in the Pyret file are always false?

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.