Question: Write the following scheme procedures in racket. Part A-20 Points-10 Points Each Part 1 Write a Scheme procedure to calculate the geometric mean of a

Write the following scheme procedures in racket.  Write the following scheme procedures in racket. Part A-20 Points-10 Points

Part A-20 Points-10 Points Each Part 1 Write a Scheme procedure to calculate the geometric mean of "a" and "b" geometric mean (a b)0.5 (note: sqrt is the square root function in scheme/racket) Part 2 Write a Scheme procedure to calculate the harmonic mean of "a" and b": harmonic mean 2/(1/a+ 1/b) Part B - 10 Points Modified your Scheme procedure from Part A, Part 1 to handle the case where you can't take the square root of a negative number. Note: testing to see if "a b" is negative is the easiest way of doing this part, if the square root doesn't exist, return -1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!