???
???

Check for Mistakes in this Word Problem: scale-image
Directions: Write a function which takes an image and a string, representing what to scale the image by. The function should return a smaller image if the string is ’smaller’ and a bigger image if the string is ’bigger’.
Contract and Purpose Statement
Every contract has three parts ...
;
scale-image:image stringimage
;
Make the image bigger or smaller, depending on the given string
Examples
Write some examples, then circle and label what changes ...
(EXAMPLE (
scale-image(circle 5 "solid" "red") "bigger")(circle 10 "solid" "red")
(EXAMPLE (
scale-triangle(triangle 20 "solid" "blue") "smaller")(triangle 10 "solid" "blue")
Definition
Write the definition, giving variable names to all your input values ...
(define (
scale-imageoriginal-image scale-factor)(
cond[
(string=? scale-factor "bigger")(scale 2 original-image)
[
(string=? scale-factor "smaller")(scale 0.5 original-image)
[
elseoriginal-image