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. Createstagecircles with each successive circle 80% of the radius of the previous one.
(hawaiian-earring 10 80)
-
double-ss: string -> string. Double eachsappearing 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 betweenstartandend: 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))