22a. Recursion Quiz 2018
You may use the Picturing Programs textbook and the blog to look up functions th at you do not know. Do not consult any other programs written by you or anyone else. (No old homework, Stack Overflow, etc.)
Have at least two check expects for each function.
-
reciprocal-squares
: number(start) number(end) -> number. Find the sum of1/n^2
for everyn
betweenstart
andend
(including both).start end sum 1 1 1.0 1 2 1.25 1 3 1.36111… -
blank-vowels
: string(word) -> string. Change every vowel (a,e,i,o,u) to an underscore (_
). Example:(blank-vowels "elephant") => "_l_ph_nt"
. -
circle-circle
: number(big-radius) number(little-radius) number(turn-angle) number(n) -> image. Producen
circles of sizelittle-radius
around the perimeter of a circle of sizebig-radius
. In between each, have a central angle ofturn-angle
. -
hollow-diagonal
: number(radius) number(n): Producen
circles of the given radius along a diagonal.