Take two minutes to think about group work experiences you’ve had in the past (in this class or otherwise). Consider:
Take five minutes with your team to:
Discuss your reflections on past experiences.
Construct a set of norms that you all agree upon.
Write your norms on the Team Norms sheet. I’ll collect these after class and redistribute them with the Exercise/Problem sheets each day. We’ll occasionally revisit norms and make adjustments as necessary.
lambda
expt
to calculate exponents; its two arguments are
the base and the exponent. Racket also has a built-in variable
pi
containing the (approximate) value of \(\pi\). Define a function that takes one
argument, radius
, and compute the volume of a sphere with
that radius.Write a function plus-root
to compute one root (the
one resulting from the + of the \(\pm\)) of the quadratic formula.
(reproduced below, in case you don’t presently have it memorized). Use
let
(or let*
) to help you make it as readable
as possible.
\[ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \]
Here’s a couple test cases in case you try it out:
(plus-root 0.5 -3 2.5)
5.0
(plus-root 0.5 -3 5)
3.0+1.0i