22a. Recursion Quiz Practice
Quiz practice: hawaiian-earring, double-ss, math-mess.
Follow the design process for each function.
-
hawaiian-earring
: number(stage) number(radius) -> image. Createstage
circles with each successive circle 80% of the radius of the previous one. -
double-ss
: string -> string. Double eachs
appearing in the string.(check-expect (double-ss "The snake was silent.") "The ssnake wass ssilent.")
-
math-mess
: number(start) number(end) -> number. For all of the numbers betweenstart
andend
: add the squares of the even numbers, subtract the square roots of the odd numbers.(math-mess 10 10) => (* 10 10) (math-mess 11 11) => (- (sqrt 11)) (math-mess 10 11) => (- (* 10 10) (sqrt 11))