size
function.
big?
function. [Hint: The
function needs to handle 2 kinds of input, and for each kind of input there are 2
possible answers and a "borderline", so you'll need 6 test cases.]
[Extra credit (10 points): Calling the size
function twice in
the function body of big?
.]make-shape
function. (You may use a nested conditional OR design helper functions. Your choice!)big?
function as follows:big?
from Exercise 15.8.3. Change the function name to big-v2?
error
function and returns the message "Sorry, big-v2? only works on numbers and
strings." for any inputs other than numbers or strings.big-v2?
.square-root
function:error
function saying
"Cannot take the square root of a
non-number."error
function
saying "Cannot take the square root of a negative
number."sqrt
).GRADING | |
Question | Point Value |
15.8.2 | 30 |
Contract | 2 |
Purpose | 1 |
Data Analysis | 5 |
Examples | 6 |
Skeleton w/Inventory | 3 |
Add details to skeleton | 3 |
Fill in the Function Body | 10 | 15.8.3 | 30 (+10) |
Contract | 2 |
Purpose | 1 |
Data Analysis | 5 |
Examples | 6 |
Skeleton w/Inventory | 3 |
Add details to skeleton | 3 |
Fill in the Function Body | 10 |
15.7.3 | +20 |
big-v2? | 12 |
square-root | 28 |
Contract | 2 |
Purpose | 1 |
Data Analysis | 5 |
Examples | 4 |
Skeleton w/Inventory | 3 |
Add details to skeleton | 3 |
Fill in the function body | 10 |
Total | 100 + 30 |
Last Modified: 4/21/14