Examples and Exponents
1 Below, place a checkmark next to each of the equations that you predict will pass when you click "Run".
(EXAMPLE (expt 5 2) (* 2 (* 2 (* 2 (* 2 (* 2))))))
(EXAMPLE (expt 4 6) (* 4 (* 4 (* 4 (* 4 (* 4 (* 4)))))))
(EXAMPLE (expt 2 3) (* 3 3))
(EXAMPLE (expt 8 3) (* 8 (* 8 (* 8))))
(EXAMPLE (expt 3 5)(+ 3 (+ 3 (+ 3 (+ 3 (+ 3))))))
(EXAMPLE (expt 1 4) (* 1 (* 1 (* 1 (* 1)))))
2 Open the Exponents Starter File and click "Run." 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 .
3 Edit each of the failing examples so that all examples pass when you click "Run". Be sure to change only the second part of the example ! Describe one of the changes you had to make.
Does it equal 16?
4 A teacher asked her students to make up expressions with exponents that evaluate to 16. She typed their expressions into WeScheme as examples to test if they evaluate to 16. Below, place a checkmark next to each of the examples that you predict will pass when you click "Run".
|
|
|
|
|
|
|
|
|
|
|
5 Open the Is it 16? Starter File and click "Run". Which tests failed?
6 The three failing examples are all wrong for the same reason. That’s because the students who wrote them doesn’t understand something about how exponents work! What do they not understand??
7 Come up with a unique exponent expression of your own that evaluates to 25, using any numbers and operators. (We’ve included one example for you in Section 2 of the starter file.) Write it in mathematical notation (not code) on the line:
8 Translate your expression to code and add it to the second examples block. Does your example pass? If not, revise it until it does.
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.